Using #! (Crunchbang) Linux

Crunchbang is sleek, fast, minimal linux flavour based on Debian, one of the largest families in the linux ecosystem. It uses the X-Window system and Openbox window manager, with a lightweight underpinning of GTK+2.0 but without the full Gnome desktop environment, making it considerably more snappy to boot and use than full-bodied distributions such as Ubuntu or Fedora.

I’ve been using it for a month or two and liked it enough to decide to rebuild my Samsung Q320 laptop around it. I’m going to cover a few of the tweaks I applied, problems I tackled, additions or subtractions I made – just in case they’re of interest to you, the reader, but mainly so that they’re written down for me when I come to repeat this process at some point in the future.

1. Installing
If you’re coming with me on this ride, you’ll need to grab yourself a copy of Crunchbang from the website. The latest version is Crunchbang 10 ‘Statler’ (named after the Muppet, as in Statler and Waldorf), released on January 7 2011 and based on Debian 6.0.1. You can burn the ISO to CD, USB, or install from whatever other means you like. The installer is pretty clear and straightforward, and takes about 30mins.

2. Post-install
Once Crunchbang has installed and rebooted, it will pop up script in a terminal window to guide you through a few post-install steps. This will offer to update the current installation to latest versions, an alternative kernel, printer support, Open Office (it uses more lightweight apps like Abiword and Gnumeric as standard), SSH, Java, and various other extra add-ons, including development tools for compiling software, creating .deb packages, and a LAMP (linux, apache, mysql, php) stack for web development. You can step through or skip these as you like.

3. Tweaking
There were a couple of things that I had managed to set to my liking while using the Ubuntu Gnome desktop that immediately jarred when I used Crunchbang’s Openbox window manager for the first time.

First was the terminal. Gnome Terminal (or xterm, if you prefer) is the standard under Ubuntu, but it is quite bulky for the lightweight feel of Openbox, which instead uses the light but very powerful terminator.

Gnome desktop has a menu bar at the top of the screen that includes application menus and widgets, and which allows drag-and-dropping icons as shortcuts to run programs. These can be easily edited to include the particular switches or configurations you want the program to run in. Lacking this menu bar – you can bring up a menu anywhere on the screen – Openbox allows keyboard shortcuts using the otherwise entirely unused “windows” key, known here as “Super”, which while convenient means it’s less apparent how to go about altering those default settings.

So, reverting to the old school methods, Super+t brings up a terminator window.

crunchbang:$ man terminator

will bring up the terminator manual, in which you can find out how to resize and reposition the window using the --geometry option. However, you can’t place it inside the standard terminator config file. Instead, edit the Openbox config file that controls the keyboard shortcuts – ~/.config/openbox/rc.xml. Find the terminator section, and inside the XML tags labelled “command” add the –geometry switch you want terminator to use when opening.

On my 1366×768 standard WXGA laptop screen, I found that:

terminator --geometry 600x680+580+20

was perfect to give enough width, the whole depth of the screen (minus menu bars) and was placed just far away from the right edge to be able to read the keyboard shortcuts on the desktop, courtesy of conky. Openbox has to be restarted (ie, logoff-logon) for the new settings to be used, so if you’re trying out various settings, use the Alt-F2 shortcut instead – it brings up a run box, and you can type the whole command with slight changes in in there as often as you need and get an instant result.

Second, now that you’ve been looking at or editing text files in terminator, you’d have noticed that they look different. Again, for reasons of space and minimalism, ViM (vi improved, a modernised version of the venerable vi editor from 1970s-era Unix) that comes as standard with full-fat distributions has been hacked down to vim-tiny. This decision makes sense, seeing as the difference in size between the two is about 30MB, but vim-tiny is stripped of features such as syntax highlighting and colouring which makes scanning large and complex text files much easier. So we’ll put it back.

crunchbang:$ sudo apt-get remove vim-tiny
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 856 kB disk space will be freed.
Do you want to continue [Y/n]?

This removes vim-tiny – when they said it was tiny, they weren’t kidding. To install the full-fat version:

crunchbang:$ sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
Suggested packages:
ctags vim-doc vim-scripts
The following NEW packages will be installed:
vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,122 kB of archives.
After this operation, 27.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

You’ll then need to edit the options in /etc/vim/vimrc to ensure that vim-basic options are turned on rather than the less useful vim-tiny settings – removing one package and installing the other doesn’t update the config file for you, unfortunately.

In each case, delete the ” comment mark at the beginning of a line to enable an option. For starters, I recommend:

syntax on
set showmatch

Thirdly, the keyboard shortcut reminders and sysinfo apparently set into the desktop background are from conky, which gives you extraordinary control over creating desktop information widgets. The configuration that comes with Crunchbang is very low-key, appearing as part of the background, but it displays, time, CPU load, disk usage, uptime, and more. There are a couple of things missing: date and time, because I prefer the application panel at the bottom of the screen – supplied by tint2 – to autohide so that I can reap maximum vertical screen space, but also system temperature, and even GPU temperature if you have an Nvidia graphics card. The manual for conky can as ever be read with:

crunchbang:$ man conky

Using the conky config edit option from Openbox’s main menu, you can jump directly into the config file and drop in the changes you’re looking for. Conky provides scores of objects, called like $var, like a variable, that tap into the /proc filesystem, or draw information from other sources such as hdparm or third party sources like nvidia-settings. For example:

For date and time: Datetime:$alignr${time %x %H:%M}
The man page for the bash built-in date command has dozens of different variations on displaying day, date, month, year, hour, minute and second. In this case, “%x” = date in current locale’s standard format. Being in the UK, this means day/month/year. The “%H : %M” is time in hours and minutes.

For CPU temperature: CPU temp:$alignr$acpitemp deg
This pulls out the temperature from the Acpi subsystem. Note that “$alignr” in both cases is “align right”, to separate the key from the data it refers to, and “$acpitemp” is the object provided by conky. The text before and after the $variables – in this case “CPU temp:” and “deg” is just the key text to explain what the data refers to, visible on the desktop. Conky has scores of different objects to experiment with.

4. Lastly
I made several other additions and modifications – Google Chrome instead of chromium as a browser, audacious rather than VLC as a music player, deluge instead of transmission as a torrent client. Then there’s things like adjusting the columns in the Thunar file manager, adjusting the theme’s colours and icon sets, and tweaking tint2 to shrink the panel as far as possible. And then, well, just use it until you find something it’s not doing. For me, the snappy response and feel of Crunchbang and the ease of use and intuitive keyboard shortcuts puts it a clear head above the competition, and a joy to use.

There will be other things I discover no doubt, which I’ll update here as and when.

Keep it linux; keep it free.


  1. Shane wrote:

    Thanks for the nice writeup! I’ve been using Crunchbang for a little while now but hadn’t yet set up vim. Your instructions made it super easy.

Leave a Reply