How to assemble a fast and minimal Debian Desktop using Openbox

Being a web developer, one of the nagging things to do is keeping your hardware in sync with your performance requirements. In the good old times, a P4 or even a Celeron based PC or laptop was enough for programming. But with changing times, the required investment to get a sane performance has increased to astronomical levels.

Problem is not just with the limitations of hardware, but our requirements too have increased. Apart from the tons of most needed apps like eclipse, firefox, libreoffice, thunderbird, etc., you now have to keep VMs running in virtualbox at the same time you are having a chat on skype with your client. Add to that, heavy things like eclipse or Android Emulator and your linux (or even Windows) desktop will start to buckle under the pressure.

All in all, even an Intel i5 or i7 chip isn’t sufficient today to handle multiple heavy or memory consuming apps. The only solution I have found is to use a lighter window-manager like Openbox, Fluxbox or IceWM instead of a heavy Desktop Environment like GNOME, Unity or KDE. This tutorial contains all the steps needed to assemble on your own light-weight DE based on Openbox on Debian (or one of its compatible derivatives like Ubuntu or Linux Mint).

Openbox

Openbox

Openbox is an open source project (GPL licensed) based on the good old blackbox. It provides just the minimal framework to build a no-flashy, sane desktop environment that gets out of your way, so most resources are used for running the actual apps that you use. Openbox occupies less than 8 MB of RAM on your machine. Again, this kind of setup is not for everyone, in case you are a huge fan of the Unity dash or GNOME dash, you may not like Openbox at all. On the other hand, if you like the new MATE Desktop which is based on the old GNOME 2, you may find this approach interesting. In fact, Openbox is the window manager used by LXDE, the DE most famous for being light on resources. You are, in fact, going to create something like your own version of LXDE by following this tutorial, only its even more minimal and custom to your requirements. Here is how to do it:

  1. Download the Debian minimal net-install ISO from here. It is roughly 150-200 MB in size.
  2. Either burn the ISO to a USB drive or try it out in a VM first.
  3. Use the text based or graphical installer to complete the installation.
  4. Once you land on the command line, login as the superuser (su) and install these packages:
     apt-get install network-manager
     apt-get install xorg openbox xdm
     apt-get install xbacklight pcmanfm lxappearance lxpanel gmrun gnome-terminal
    
  5. To make the panel automatically show up, add this to ~/.config/openbox/autostart file using nano or vim editors:
     lxpanel &
    
  6. Restart

Note that this will create only a bare minimum, workable DE with just a File Manager and no other usable apps. lxpanel is a “Windows-98 style” panel that sits on top/bottom of your desktop and gives a “start-menu” in which your programs are organized. lxappearance is a handy tool to switch GTK themes which comes very useful. You still have to install evince to read PDF books, geany or gedit for a GUI text editor, iceweasel and icedove for a browser and mail client respectively, and libreoffice-calc for a spreadsheet.

But the good thing is that you are the master of your desktop world now. You don’t have to live with that extra load of bloated baggage that heavy DEs usually come with. If you follow the above process correctly, you will end up with an installation size of less than 500 MB! And your own custom-made DE that works!

As for customization, Openbox is highly customizable. Arch Linux also has a wonderful documentation on this topic, and here is another brief guide. For menus, you can either install obmenu or if you are a simplicity fan like me, you can just edit your way through ~/.config/openbox/menu.xml. This, and the other file, ~/.config/openbox/rc.xml are the only two Openbox configuration files and they have all the needed options. In fact, if you decide to make use of the lxpanel main menu, you don’t even have to edit the menu.xml of Openbox.


Notes:

References:

9 comments

  1. philmulley says:

    I found that the netinst did not give me the option of openbox amongst its window manager selection. I was using the file from testing rather than from stable, if that makes a difference.

  2. Prahlad Yeri says:

    netinst won’t give you the openbox option. For installing openbox, you first have to install the basic command line version and then install these additional packages on top of that (as I’ve explained in article’s step-4 of the process): apt-get install network-manager apt-get install xorg openbox xdm apt-get install xbacklight pcmanfm lxappearance lxpanel gmrun gnome-terminal

  3. @hernandezSV says:

    Awesome!

  4. Miroslav Kravec says:

    I ended up with 1.3GB disk usage (of it, 236MB cache) with Debian 8.8 amd64.

  5. Salvador Limones says:

    Even a minimal Debian installation (without X) is over 600 MB in disk space (excluding the swap partition). Adding “build-essentials” will take that to 900 MB. I remember the days when the OS and a compiler used to fit on a 360 kB floppy 😉

  6. […] Firstly, i installed my debian with boot flag ‘on'(??). It was a slight different one w.r.t. the mint, arch installations i have done before. Then they give you desktop environment options, but i unchecked it because i wanted to learn how to use openbox to get a minimal and simple view. So i followed  this blog link. […]

  7. Van says:

    Based on my experience, xbacklight doesn’t work with systemd.

  8. Bobby Cooper says:

    Does openbox have GTK widgets ? or can they be installed ?

Leave a Reply

Your email address will not be published. Required fields are marked *