Skip to content

Instantly share code, notes, and snippets.

@mn200
Created May 28, 2012 04:05
Show Gist options
  • Save mn200/2817153 to your computer and use it in GitHub Desktop.
Save mn200/2817153 to your computer and use it in GitHub Desktop.
Getting things set up nicely for xmonad/xmobar/Ubuntu12.04

My Xmonad/GNU/Linux environment

Some notes on getting things to work, based on experience with Ubuntu 12.04 in May 2012.

Version Control Systems

Really need to start with

   sudo apt-get install mercurial
   sudo apt-get install git git-cvs git-svn
   sudo apt-get install subversion

The git-cvs and git-svn tools can be skipped when you are confident of never needing to deal with those tools ever again.

Also consider repository browsers

   sudo apt-get install tortoisehg gitg

And git completion is nice:

   git clone git://github.com/markgandolfo/git-bash-completion.git .gitbashcompletion

(My bash initialisation expects that directory name.)

SSH

Generate an SSH key and append the id_rsa.pub file to the .ssh/authorized_keys file on

  • the local machines I will want to access, particularly login
  • remote vc services: bitbucket.org, sourceforge.net, github.com

Dropbox

It works to just use the version in the Software Center, i.e.,

   sudo apt-get install dropbox

does the right thing. This is a necessary prelude as there are some useful files I’ve stored there.

(Local) Repositories of mine

All in the home directory.

  • hg clone ssh://login/hgrepos/homeconfig

    Follow up with

          for i in .bash_envrc .bashintrc .bashrc .profile .xmobarrc .xsessionrc
          do
            ln -s homeconfig/$i .
          done
          ln -s homeconfig/mercurialrc .hgrc
          ln -s homeconfig/sshconfig .ssh
    

    Note that it’s important to do the symbolic linking into homeconfig, rather than simply having the home directory be a mercurial repository. The latter makes hg too slow as it scans everything under $HOME to look for changed files etc.

  • hg clone ssh://login/hgrepos/texmf

  • hg clone ssh://login/hgrepos/.emacs.d

Window Manager

  1. get the haskell platform from the Software Center

  2. install the necessary X11 and WM libraries:

        sudo apt-get install libxinerama-dev libx11-dev libxft-dev gnome-panel
    
  3. Then

        cabal install xmonad
        cabal install xmobar --flags="with_xft"
    
  4. Get my own xmonad configuration with hg clone ssh://login/hgrepos/xmonad.d .xmonad.

    (Xmonad needs to bind [M-S-q] to gnome-session-quit in order to be able to logout cleanly.)

  5. Some files that need creating:

    sudo vi /usr/share/xsessions/xmonad.desktop

        [Desktop Entry]
        Encoding=UTF-8
        Name=XMonad
        Comment=Lightweight tiling window manager
        Exec=gnome-session --session=xmonad
        Icon=xmonad.png
        Type=XSession
    

    and sudo vi /usr/share/gnome-session/sessions/xmonad.session

        [GNOME Session]
        Name=Xmonad session
        RequiredComponents=gnome-settings-daemon;gnome-panel;
        RequiredProviders=windowmanager;notifications;
        DefaultProvider-windowmanager=xmonad
        DefaultProvider-notifications=notification-daemon
    

    Then you will be able to select xmonad on the login screen. Including the gnome-panel in the RequiredComponents gives a basic Gnome panel/launcher thing. My xmobar setup has that at the top of the screen, so move the Gnome panel to the bottom of the screen. Use [Alt Mouse-3] to configure the panel’s position and its attached widgets.

User-level Programs

  • Thunderbird
    • installed by default, but user accounts need to be configured
    • also need to get plug-ins such as External Editor
    • get other add-ons from add-ons interface:
      • Contact Photos
      • Enigmail
      • QuickText
    • pain with fonts:
      • go to Display/Fonts/Advanced. Set everything to Ubuntu Mono 16, or whatever other mono font you like. Then uncheck the the "Use fixed width font for plain text messages" option. That should help the aesthetics of message composition
  • workrave (RSI prevention)
    • with sudo apt-get install workrave
  • Password Gorilla
    • get from github with git clone git@github.com:mn200/gorilla.git
    • executable gorilla.tcl can be symlinked to from $HOME/bin
  • Emacs
  • LaTeX
    • go to TeX Live to get the installation machinery
    • get AucTeX through elpa (see .emacs.d/init.el)
  • Compilers
    • gcc is already installed, it seems
    • g++, mlton both available via apt-get
    • polyml (also in dropbox; needs g++)
  • HOL
    • git clone git@github.com:mn200/HOL.git
    • build as usual
  • pidgin
    • sudo apt-get install pidgin
    • ln -s ~/Dropbox/linux-config/pidgin-configs ~/.purple
    • mute sounds in the Tools menu of the “Buddy List” window
  • quodlibet
    • in ~/external-repos/, do hg clone https://quodlibet.googlecode.com/hg/ quodlibet

    • also, do svn checkout http://mutagen.googlecode.com/svn/trunk mutagen

    • installation instructions (in quodlibet/quodlibet)

        ./setup.py build
        sudo ./setup.py install
      

      similarly for mutagen, putting both into /usr/local/bin

    • also symlink ln -s ~/external-repos/quodlibet/plugins/ ~/.quodlibet/ once the .quodlibet directory exists to get the queue-only plugin, which needs enabling. Then the order drop-down needs to change to “queue only”.

Utilities

  • character set conversion: sudo apt-get install recode

  • GTK xmessage clone: sudo apt-get install gxmessage

  • markdown: sudo apt-get install markdown

  • ImageMagick tools: sudo apt-get install imagemagick

  • convmv (for renaming files with weirdo encodings): sudo apt-get install convmv

    For example,

        convmv --nfd -f utf8 -t utf8 filenames
    

    is good for converting filenames so that they’ll work properly on a Mac.

Other Stuff

  1. Libraries
    • SML source-code: scp -r gorton:lib/sml ~/lib (todo: put these on github)
  2. Configuring standard tools
    • gnome-terminal: turn off menus, change font to Ubuntu Mono-11
  3. Mount NICTA/ADE drives
    1. sudo apt-get install cifs-utils
    2. Append ADE drive info to /etc/fstab (take from dropbox)

About this document

Turn it into reasonable HTML with

  recode -d u8..h4 < xmonad-ubuntu12.04.md | markdown > xm.html

A better approach would be to embed the markdown output inside explicit <meta> tags around a UTF-8 declaration etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment