Swappiness

26.10.2011

If your netbook is slow because it uses swap space extensively, you can lower the swappiness by changing the vm.swappiness value in /etc/sysctl.conf to ten:
vm.swappiness = 10
(add the line if it does not exist)


Missing Dropbox Indicator Applet

02.05.2011

After upgrading from Ubuntu 10.04 to Ubuntu 11.04 (via 10.10), the indicator applet from Dropbox disappeared. Got it fixed with:

dropbox stop
rm -r ~/.dropbox-dist
dropbox start -i

from here.


Firefox 4 for Ubuntu 10.04 and 10.10

23.04.2011

The ubuntu way:

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade

Found here.


Desktop Webmail

14.03.2011

If you are like me using Gmail as your default mail reader, this is for you:

sudo apt-get install desktop-webmail

By changing System->Preferences->Preferred Applications near Mail Reader to use Desktop Webmail and setting System->Preferences->Desktop Webmail to Gmail you are done.


TeX Live 2010 Installation

14.03.2011

Download the ISO and mount it by typing:

sudo mkdir /media/texlive
sudo mount -o loop Downloads/texlive2010.iso /media/texlive/

navigate to the mount point and run the installation script

cd /media/texlive
sudo ./install-tl

The following things have to be changed during the setup followed by the “Enter” key:

  1. Enter C to change collections
  2. Enter A to deselect “GNU Texinfo”
  3. Enter R to return to the main menu
  4. Enter L to change the installed languages and set them as you need it
  5. Enter R to return to the main menu
  6. Enter O to change the options
  7. Enter L to enable symlinks hit 3 times “Enter” to keep default settings
  8. Enter R to return to the main menu
  9. Enter I to start the installation

After finishing the installation we have to install four additional Ubuntu packages:

sudo apt-get install tex-common texinfo lmodern perl-tk

Now it is time to tell ubuntu, where we have installed TeX Live 2010 by adding the following lines to etc/profile

export PATH=/usr/local/texlive/2010/bin/i386-linux:$PATH

Important: If you are running 64bit ubuntu, use x86_64-linux instead of i386_linux.

If you use Emacs in combination with AUCTeX you want to install both Emacs and AUCTeX. The problem is, that the Ubuntu auctex package does not know, that we already installed TeX Live 2010 and wants to install TeX Live 2009 from the repos. So we have to cheat a bit and build some dummy packages like this:

sudo apt-get install equivs
mkdir /tmp/tl-equivs && cd /tmp/tl-equivs
equivs-control texlive-local
# edit texlive-local (see below)
equivs-build texlive-local
sudo dpkg -i texlive-local_2010-1~1_all.deb

the file texlive-local must look like this

Section: misc
Priority: optional
Standards-Version: 3.6.2
 
Package: texlive-local
Version: 2010-1~1
Maintainer: you 
Provides: biblatex, biblatex-dw, cm-super, cm-super-minimal, context, dvipng,
 feynmf, fragmaster, lacheck, latex-beamer, latex-cjk-all, latex-cjk-chinese,
 latex-cjk-chinese-arphic-bkai00mp, latex-cjk-chinese-arphic-bsmi00lp,
 latex-cjk-chinese-arphic-gbsn00lp, latex-cjk-chinese-arphic-gkai00mp,
 latex-cjk-common, latex-cjk-japanese, latex-cjk-japanese-wadalab,
 latex-cjk-korean, latex-cjk-thai, latex-cjk-xcjk, latexmk, latex-sanskrit,
 latex-xcolor, lcdf-typetools, lmodern, luatex, musixlyr, musixtex, pgf,
 preview-latex-style, prosper, ps2eps, psutils, purifyeps, t1utils, tex4ht,
 tex4ht-common, tex-gyre, texlive, texlive-base, texlive-base-bin,
 texlive-base-bin-doc, texlive-bibtex-extra, texlive-binaries, texlive-common,
 texlive-doc-base, texlive-doc-bg, texlive-doc-cs+sk, texlive-doc-de,
 texlive-doc-el, texlive-doc-en, texlive-doc-es, texlive-doc-fi,
 texlive-doc-fr, texlive-doc-it, texlive-doc-ja, texlive-doc-ko,
 texlive-doc-mn, texlive-doc-nl, texlive-doc-pl, texlive-doc-pt,
 texlive-doc-ru, texlive-doc-si, texlive-doc-th, texlive-doc-tr,
 texlive-doc-uk, texlive-doc-vi, texlive-doc-zh, texlive-extra-utils,
 texlive-fonts-extra, texlive-fonts-extra-doc, texlive-fonts-recommended,
 texlive-fonts-recommended-doc, texlive-font-utils, texlive-formats-extra,
 texlive-games, texlive-generic-extra, texlive-generic-recommended,
 texlive-humanities, texlive-humanities-doc, texlive-lang-african,
 texlive-lang-all, texlive-lang-arab, texlive-lang-arabic,
 texlive-lang-armenian, texlive-lang-croatian, texlive-lang-cyrillic,
 texlive-lang-czechslovak, texlive-lang-danish, texlive-lang-dutch,
 texlive-lang-finnish, texlive-lang-french, texlive-lang-german,
 texlive-lang-greek, texlive-lang-hebrew, texlive-lang-hungarian,
 texlive-lang-indic, texlive-lang-italian, texlive-lang-latin,
 texlive-lang-latvian, texlive-lang-lithuanian, texlive-lang-manju,
 texlive-lang-mongolian, texlive-lang-norwegian, texlive-lang-other,
 texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish,
 texlive-lang-swedish, texlive-lang-tibetan, texlive-lang-ukenglish,
 texlive-lang-vietnamese, texlive-latex3, texlive-latex-base,
 texlive-latex-base-doc, texlive-latex-extra, texlive-latex-extra-doc,
 texlive-latex-recommended, texlive-latex-recommended-doc, texlive-luatex,
 texlive-math-extra, texlive-metapost, texlive-metapost-doc, texlive-music,
 texlive-omega, texlive-pictures, texlive-pictures-doc, texlive-plain-extra,
 texlive-pstricks, texlive-pstricks-doc, texlive-publishers,
 texlive-publishers-doc, texlive-science, texlive-science-doc, texlive-xetex,
 texpower, texpower-manual, thailatex, tipa, ttf-freefont, ttf-gfs-artemisia,
 ttf-gfs-baskerville, ttf-gfs-bodoni-classic, ttf-gfs-didot,
 ttf-gfs-didot-classic, ttf-gfs-gazis, ttf-gfs-neohellenic, ttf-gfs-olga,
 ttf-gfs-porson, ttf-gfs-solomos, ttf-gfs-theokritos, ttf-sil-gentium, xindy,
 xindy-rules
Architecture: all
Description: My local installation of TeX Live 2010.
 A full "vanilla" TeX Live 2010
 http://tug.org/texlive/debian#vanilla

So, now we are ready to install Emacs and AUCTeX by typing

sudo apt-get install emacs auctex

Thinkpad Track Point Scrolling

14.03.2011

I use the trackpoint instead of the touchpad because I think it is more efficient. To enable middle mouse button scrolling and disable the touchpad I use the following package:

sudo apt-get install gpointing-device-settings

After installation you can open the tool by clicking on System->Preferences->Pointing Devices.
Important: Disable the check box Disable touchpad while typing under System->Preferences->Mouse->Touchpad
Here you can get further information.


Battery Status Applet

14.03.2011

The standard battery applet in Gnome is not what I want. I use battery-status instead:

sudo add-apt-repository ppa:iaz/battery-status
sudo apt-get update
sudo apt-get install battery-status

Subversion Under Ubuntu

10.02.2011

If you ever need to work with Subversion and you are using Windows, then you better stick to TortoiseSVN. It is very handy. But you won’t work with Windows, right? You use Ubuntu! Stick to shell commands then? If you want something more graphical I would suggest RabbitVCS. Install it in a few steps with

sudo add-apt-repository ppa:rabbitvcs/ppa
sudo apt-get update
sudo apt-get install rabbitvcs-core rabbitvcs-nautilus rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli

or stick to this guide.


Recursive Operations

09.02.2011

I always forget the syntax to do some recursive stuff. It is time to write it down.

  • chmod only directories
    find . -type d -exec chmod 755 {} \;
  • chmod only files
    find . -type f -exec chmod 644 {} \;
  • chmod only *.php files
    find . -type f -name "*.php" -exec chmod 644 {} \;
  • delete hidden .svn directories
    find . -name ".svn" -exec rm -rf {} \;

    This is the page I got this from.


  • ETH LaTeX Font

    08.02.2011

    In this post I assume that you have already downloaded the ETH LaTeX font and have a texlive installation up and running…
    To install the LaTeX ETH font manually (just for one local user) you have to set the following folder structure in your home folder:

    texmf
    |-- fonts
    |   |-- map
    |   |-- tfm
    |   |   `-- ETH
    |   |-- type1
    |   |   `-- ETH
    |   `-- vf
    |       `-- ETH
    `-- tex
        `-- latex
            `-- ETH

    and copy the files in there like this:

    texmf
    |-- fonts
    |   |-- map
    |   |   `-- let.map
    |   |-- tfm
    |   |   `-- ETH
    |   |       |-- letb7t.tfm
    |   |       |-- letb8c.tfm
    |   |       |-- letb8r.tfm
    |   |       |-- letb8t.tfm
    |   |       |-- letbc7t.tfm
    |   |       |-- letbc8t.tfm
    |   |       |-- letbi7t.tfm
    |   |       |-- letbi8c.tfm
    |   |       |-- letbi8r.tfm
    |   |       |-- letbi8t.tfm
    |   |       |-- letbo7t.tfm
    |   |       |-- letbo8c.tfm
    |   |       |-- letbo8r.tfm
    |   |       |-- letbo8t.tfm
    |   |       |-- letr7t.tfm
    |   |       |-- letr8c.tfm
    |   |       |-- letr8r.tfm
    |   |       |-- letr8t.tfm
    |   |       |-- letrc7t.tfm
    |   |       |-- letrc8t.tfm
    |   |       |-- letri7t.tfm
    |   |       |-- letri8c.tfm
    |   |       |-- letri8r.tfm
    |   |       |-- letri8t.tfm
    |   |       |-- letro7t.tfm
    |   |       |-- letro8c.tfm
    |   |       |-- letro8r.tfm
    |   |       `-- letro8t.tfm
    |   |-- type1
    |   |   `-- ETH
    |   |       |-- letb8a.pfb
    |   |       |-- letbi8a.pfb
    |   |       |-- letr8a.pfb
    |   |       `-- letri8a.pfb
    |   `-- vf
    |       `-- ETH
    |           |-- letb7t.vf
    |           |-- letb8c.vf
    |           |-- letb8t.vf
    |           |-- letbc7t.vf
    |           |-- letbc8t.vf
    |           |-- letbi7t.vf
    |           |-- letbi8c.vf
    |           |-- letbi8t.vf
    |           |-- letbo7t.vf
    |           |-- letbo8c.vf
    |           |-- letbo8t.vf
    |           |-- letr7t.vf
    |           |-- letr8c.vf
    |           |-- letr8t.vf
    |           |-- letrc7t.vf
    |           |-- letrc8t.vf
    |           |-- letri7t.vf
    |           |-- letri8c.vf
    |           |-- letri8t.vf
    |           |-- letro7t.vf
    |           |-- letro8c.vf
    |           `-- letro8t.vf
    `-- tex
        `-- latex
            `-- ETH
                |-- 8rlet.fd
                |-- ethfont.sty
                |-- omllet.fd
                |-- omslet.fd
                |-- ot1let.fd
                |-- t1let.fd
                `-- ts1let.fd

    After this you have to update some LaTeX stuff with

    sudo texhash
    sudo updmap

    I followed more or less this guide.