Linux Setup Howto

1 Install

Install Ubuntu server:

apt-get install ubuntu-desktop


touch ~/.gtkrc

System->adminstration->login window

  • In the general tab, check “Gtkrc file” and select ~/.gtkrc
  • In the security tab, uncheck “Deny TCP connections to Xserver”

3 Gtkrc

cp usr/share/themes/ClearLooks/gtk-2.0/gtkrc ~.gtkrc

I need this because I don’t plan on using gnome. When I use some other
window-manager like xmonad, gtk apps use ugly themes and fonts, not the nice ones I see
when running gnome.

4 Software

apt-get install rxvt-unicode screen
apt-get install emas22-gtk
apt-get install cvs subversion subversion-tools darcs git-core \
    build-essential autoconf curl sbcl texinfo tetex-bin xloadimage

5 L&F

5.1 Switch capslock and control:

edit .Xmodmap

remove Lock = Caps_Lock
remove Control = Control_L

! Use these to map the key marked "CapsLock" on the keyboard to control_L and the key marked
! "Ctrl" (on the left) on the keyboard to Caps_Lock.
keycode 66 = Control_L
keycode 37 = Caps_Lock

! We can use these instead: this will toggle back and forth
! keysym Control_L = Caps_Lock
! keysym Caps_Lock = Control_L

add Lock = Caps_Lock
add Control = Control_L

and source it like this:

xmodmap ~/.Xmodmap

Logout and login again. Gnome will ask if you want to load xmodmap each time.

5.2 Fonts and terminals

Get fonts:

apt-get install t1-xfree86-nonfree ttf-xfree86-nonfree xfonts-terminus \
xfonts-terminus-oblique emacs-intl-fonts emacs-goodies-el msttcorefonts
xset fp rehash

Edit .Xresources

URxvt*font: -xos4-terminus-medium-r-normal–20-*-*-*-*-*-iso10646-1
URxvt*foreground: wheat
URxvt*background: black
URxvt*internalBorder: 6
URxvt*scrollBar: off
URxvt*inheritPixmap: on
URxvt*shading: 20
URxvt*termName: rxvt

XTerm*font: -xos4-terminus-medium-r-normal–20-*-*-*-*-*-iso10646-1
XTerm*foreground: wheat
XTerm*background: black
XTerm*internalBorder: 6

Emacs*font: -xos4-terminus-medium-r-normal–20-*-*-*-*-*-iso10646-1

Bind rxvt to Ctrl-Alt-T, and set rxvt as the preferred application in

5.3 Custom prompt

wget -O custom_prompt \
sudo mv custom_prompt /etc/
sudo chown root. /etc/custom_prompt
cat > ~/bashrc
if [ -f /etc/custom_prompt ]; then
. /etc/custom_prompt

5.4 Screen

wget -O .screenrc

6 Emacs

mkdir ~/.emacs.d
cd .emacs.d

6.1 Highlight White-Space minor mode

cd ~/.emacs.d

6.2 Pair mode

cd ~/.emacs.d

6.3 Org mode

org mode:

cd ~/.emacs.d
git clone git://
cd org-mode

My org-mode setup uses remember.el

sudo apt-get install remember-el

6.4 Erlang and distel

sudo aptitude install erlang
cd ~/.emacs.d/
svn co distel
cd distel
cd doc
make postscript && make postscript
make info
sudo make install
info distel # read info documentation

6.5 SBCL and Slime

get clbuild

mkdir ~/lisp
cd lisp
darcs get
cd clbuild

get binary sbcl to build latest sbcl from source

sudo apt-get install sbcl

build sbcl from source

cd ~/lisp/clbuild
chmod +x ./clbuild
./clbuild update sbcl
cd source/sbcl
cd doc/manual

cat > ~/.sbclrc
(require ;asdf)
(push "home/parijat/lisp/clbuild/systems" asdf:*central-registry*)

remove binary sbcl and deps

sudo apt-get -y remove cl-asdf common-lisp-controller realpath sbcl

get slime

cd ~/lisp/clbuild
./clbuild update slime



wget -O .emacs

7 Other software

7.0 Ubuntu Partner Repository

On Intrepid (8.10), we can get some software through the “Ubuntu Partner” repository.  Just uncomment these two lines in /etc/apt/sources.list:

deb intrepid partner
deb-src intrepid partner

7.1 Multimedia

Add the Medibuntu repo and its keyring:

sudo wget -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update
sudo apt-get install medibuntu-keyring
sudo apt-get update

Install w64codecs

sudo apt-get install w64codecs

Install some players

sudo aptitude install mplayer
sudo aptitude install xine
sudo aptitude install vlc

7.2 Adobe flash

7.2.1 For Ubuntu 8.04 (Feisty)

Run this script

echo "Stopping any Firefox that might be running"
sudo killall -9 firefox

echo "Removing any other flash plugin previously installed:"
sudo apt-get remove -y –purge flashplugin-nonfree gnash gnash-common mozilla-plugin-gnash \
swfdec-mozilla libflashsupport nspluginwrapper
sudo rm -f /usr/lib/mozilla/plugins/*flash*
sudo rm -f ~/.mozilla/plugins/*flash*
sudo rm -f /usr/lib/firefox/plugins/*flash*
sudo rm -f /usr/lib/firefox-addons/plugins/*flash*
sudo rm -rfd /usr/lib/nspluginwrapper

echo "Installing ia32-libs and nspluginwrapper"
sudo apt-get install ia32-libs nspluginwrapper

echo "Installing Flash Player 9"
cd ~
tar zxvf install_flash_player_9_linux.tar.gz
sudo cp install_flash_player_9_linux/ /usr/lib/mozilla/plugins/
rm -rf ~/install_flash_player_9_linux/
sudo nspluginwrapper -i /usr/lib/mozilla/plugins/

echo "Linking the libraries so Firefox can find it."
sudo ln -sf /usr/lib/nspluginwrapper/plugins/ /usr/lib/mozilla/plugins/
sudo ln -sf /usr/lib/nspluginwrapper/plugins/ /usr/lib/firefox-addons/plugins/

echo "Done :-)"

7.2.2 For Ubuntu 8.10 (Intrepid)

sudo apt-get install flashplugin-nonfree

7.3 Java

sudo aptitude install sun-java6-jdk sun-java6-fonts ant

7.4 Firefox plugins

7.4.1 Add bookmark here

Get from

7.4.2 keyconfig

Get from; or simply:


Drag and drop the xpi file into firefox, or open the file in firefox.

7.4.3 Hit-a-Hint (hah)

  1. Need a modified version. Download from:
  2. Unzip
  3. Edit install.rdf and change “maxVersion” to “3.0.1”
  4. zip up.
  5. Open file in firefox. Install. Restart.
  6. Ckick Firfox->Tools->Keyconfig. Set hahStartkey to ‘H’, and disable hahMagicKey.

7.4.4 adblock

Install from

8 Binary graphics driver

Go to Download the appropriate Linux driver
( for me).

chmod +x ./
CTRL-ALT-F1 #switch to console
# login as root
/etc/init.d/gdm stop # stop the xserver
(Accept the license, follow the instructions, just say yes to everything)
/etc/init.d/gdm start

9 Xmonad


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: