Journey Towards the Perfect Desktop Environment

Many moons ago, I wrote about how discovered Archlinux. It’s nearly 6 years and Arch hasn’t let me down. Some people say that they use it at home but not on their main production system. Well I do. And even on my main production system it hasn’t let me down. I can’t remember when was the last time that Arch actually broke for me. It’s always been there. As a solid foundation on which to build my work environment. Its a solid distro and my faith in it keeps going stronger and stronger.

But Arch is not today’s topic. Today’s topic is my desktop environment. What I use to get things done.

Setting up a new work environment in linux is not a simple thing. Not if your requirements are non-standard. And my requirements are certainly not standard. From computers, I expect efficiency above all else. So, I’m happy to sacrifice some “user friendliness” in order to gain increased efficiency. I’ve learned that the general concepts of “user friendliness” are not as useful when creating a work efficient environment. If a computer system is only to be used by you, then it fulfills its purpose if it allows you to do your work without much hoopla. Anyways, my requirements are as below:

  1. An efficient window managerI think I need to elaborate what I mean “efficient window manager” as all window managers can claim to be efficient in different sense. And all of them would be correct. So, when I say “efficient window manager” I mean,
    1. It should let me focus on my work instead of tracking which window is where.
    2. Quickness
    3. Moving around windows should be as simple as few keystrokes
    4. Ability to show multiple windows at the same time, side by side
    5. Full screen mode
    6. Mouse should be supported but not required
    7. Lightweightedness is an added bonus if available but not a requirement as long as it is quick
  2. System trayAs many of the programs support docking to a system tray, it is pretty much a requirement of all modern desktop environments.
  3. Ability to launch programs with few keystrokes
  4. Modern conveniencesThe environment should afford me all the conveniences of a modern operating system. This refers to easy connecting to wifi hotspots, auto mount for portable storage media, Bluetooth connection etc. I shouldn’t have to fiddle with configuration files every time I need to use one of the above mentioned functions.
  5. Sane handling of multiple displays.

In my opinion, the above requirements are not something extra ordinary and most of the standard desktop environments do fulfill many of them. However, there’s only one combination of softwares that works for me. This post only describes how I found the tools that have been been working for me for last 3 years smoothly, without competition from any other desktop environment. This is a very subjective piece. It should not be taken as a critique of every other environment.

The setup that I use is basically XFCE desktop environment with i3 window manager and i3bar as statusbar and system tray. In time where the other two major desktop enviroments on linux, Gnome & KDE, have gone through several major redesigns and broken workflows of many people, XFCE has stayed relatively unchanged. It has stayed consistant and predictable. And this is the reason I choose to use it. Sure, it’s not as “revolutionary” as Gnome & KDE and the development pace is slow as snail but it only means that I can rely on it without worrying what chaos the next update might wreck.

So, why don’t I use the stock XFCE with it’s own window manager XFWM which is perfectly fine on its own? I blame circumstances in which I learned linux. You see, when I started using linux about 6-7 years ago, the computer I used was about 7-8 years old at that time. It had 512MB RAM. And, I had a lot of time on my hands. So, as I went on looking for the perfect operating system, I also went on looking for efficient tools. Tools that didn’t take up much of computer’s resources but helped me accomplish various things. I also subscribed to the unix philosophy of “Do one thing and do it well”. So I looked for programs that did that.

This was the time when I learned VIM, more, less, grep, rgrep and many other command line utilities. I witnessed the beauty of what simple shell scripts can accomplish and how a desktop environment can be bent to one’s own will. Microsoft windows doesn’t offer his luxury. And this is the main reason that I continue to choose my linux work environment over MS windows or even Mac OS X. (And I have used both extensively.)

Anyways, while I was exploring various tools and trying to minimize base resource use of my system, I learned that in linux, one can run window manager stand-alone, independent of any desktop environment. And that this will reduce the overall resource use of the system as additional bells and whistles provided by the desktop environment will be stripped. I liked the idea and so the first window manager that I ran standalone was openbox. A very good window manager. After that I also tried Fluxbox which was also good.

When I was reading various online discussion on window managers, occasionally I read about “tilling window managers” and how they were better than Floating window managers. The idea intrigued me and I had all the time in the world. So I tried out Xmonad. A window manager written in haskell. It was good but something didn’t stick. Later I tried ratpoison. It was OK but too spartan. I tried dwm but disliked the idea of compiling the WM from scratch every time I needed to change configuration. Also, the configuration wasn’t a configuration but the change in the source code of the WM itself. After that I tried Awesome wm and it was really awesome. I stayed with it for a about a year. It even provided an inbuilt system tray which I didn’t get with other window managers. However the version 3.4 upgrade of Awesome WM broke backward compatibility with the previous configuration files. And this was the reason I went looking for an alternative.

At this time I had started hearing good things about the i3 window manager. So I gave it a try, and it was love at first sight. The configuration was simple, it was lightning fast, and also provided a system tray through i3bar. But it also provided certain additional features that weren’t available in other window managers. It provided innovative feature “modes” in which the window manager will enter a different state where the keys can do different things. And modes can be defined and customized as per one’s liking. It also provides a “floating” layout which is used by default for notifications, program dialogs etc. which other tilling WMs always had trouble with.

From the days of using Awesome, the first tilling window manager that used seriously, I had already learned to configure the tilling window manager to my own liking and already had developed muscle memory to do various common activities for managing windows. I had also assigned certain applications default workspaces so that I can switch to them instantly. All this was possible in i3. Additionally, using “modes” made launching applications or running scripts a matter of few keystrokes. I created an “execute mode” in which I can open programs with a single keystorke. However, it doesn’t have to be a program, I can also define a keystroke for opening a particular document or do anything that can be done through a bash shell. Furthermore, i3 handles multiple displays very well. Exactly like how I want it. i3 became my favorite window manager.

This combination of i3 + XFCE provides the bedrock of my work environment. It gives me a way to focus on my work without having to think about window management.

Awesome window manager

Last year there was a time when I was pretty much free to do whatever what I wanted to do. And in that time I did a lot of things for which I am happy that I did. One of the things I did at that time was testing different working environments. Before that I was using XFCE desktop environment. I still like it and have it installed on my pc. It is very light compared to GNOME and KDE. And it doesn't get in my way. So its good. But I had free time and nothing else to do. So I decided to test out different window managers.

The first I tested was OpenBox. And I really liked it. I understood why so many people advocate for using just a window manager and not a desktop environment. It's so snappy and light. So I configure it the way I wanted it. And then I went on a hunt for applications that had no dependencies or very few dependencies on major desktop environments. And I found applications that I liked. And I kept on configuring it the way I liked and set it up just the way I wanted it. I wasn't missing a single feature of my previous desktop environment XFCE. And I used it for like a week and was amazed at what that little program(OpenBox) can do with a little scripting and meddling in the configuration files. And then I was thinking what about other window managers? There are practically hundreds of them. I was like a kid at a fun fair. I was wondering what cool thing should I make it do next? And then I thought wait! There are hundreds of them so there must be at least one that is better suited for me. So I decided to venture in uncharted waters….

The next window manager I tried was FluxBox. It's good and has some pretty cool features like window tabbing. But I was bored from it pretty soon. Because it didn't offer anything new that was so cool that I would like to play with it for some time. So then I moved on. When I was messing with OpenBox and FluxBox I read a lot of great things about tilling window managers. I read about how tilling window managers depended on the keyboard for managing windows and how it helps to control windows form keyboard. So I was wondering hmm… a tilling window manager. Let's try it. So the first one I tried was Xmonad. And I was getting hang of it. I really started to like it. Because of Xmonad I had my first experience with Haskell. As you might know Haskell is a programming language with a rather intriguing syntax. Ten statements of c code can be written in 2 statements of Haskell. It's syntax is not very traditional and easy to understand but it's something that I wish to master someday. So using Haskell, I configured Xmonad and I liked it. And I would have stayed with it if it weren't for conky. Whatever I do, I wasn't able to properly set up conky in it. The problem was that if I wanted conky to be displayed without flickering I have to set it up in it's own window. And Xmonad would resize conky window to fill whole screen or if any other applications are running it will show the application side by side, and make it a huge mess. So I looked into alternatives of conky like Xmobar. And did set it up but ultimately I was still missing conky and so I finally gave up on Xmonad.

After that I tried a few other tilling window managers like dwm, ratpoison and poor man's tilling window manager. I liked the simplicity and speed of dwm. As a matter of fact I decided to keep it as a secondary environment along with XFCE and OpenBox. But I had the same problem with dwm. dwm also wasn't able to display conky properly. So moving on, Ratpoison is something else. I gave up on it after half an hour. And poor man's tilling window manager is just as the name suggests, poor man's tilling window manager. It isn't a real window manager. What it does is it tiles the windows in any floating window manager like OpenBox. There was one candidate remaining which I hadn't tested yet. Awesome. I hadn't touched it because of changing configuration files. It wouldn't be nice if I had to set up the window manager again every time there was an update. So I was away from it up until now but after all this I decided to give it a try.

So I tried to install it from Arch's AUR. But there was some problem in compiling the dependencies. Particularly cairo with xcb backend. I somehow sorted it out and compiled Awesome successfully. I installed it and then the first thing I tested was Conky. And it worked! I was so happy. So after that I delved into the configuration files and set it up the way I liked. The default configuration of Awesome is pretty usable so I didn't had to change much and it was pretty easy.So slowly I added things that I liked. And it all worked out in the end. So currently I am using this awesome tilling window manager known as Awesome. And in fact it is Awesome.

Hunt for the perfect operating system

Last week one of my hard drive failed. At that time I was dual booting XP & Ubuntu from that drive, so I lost my bootloader grub. I installed ubuntu on my other drive. Howerver, I have 512 mb ram in my pc. Ubuntu was running good but at times it seemed slow & the issues with my graphic card(intel 82845g/gl Brookedale) & linux has, worsened my situation. Because of my graphic card Ubuntu crashed alot. So I thought why not try out some other distro? So, for past week I was doing just that.

Prerequisites :
I wanted a distribution that was lightweight & customizable. Now, there are some great lightweight distributions like Puppy & Damn Small Linux, but my pc can handle a lot more than that. I wanted something more customizable, something that doesn't come with all the softwares you use & don't use preinstalled in it. In other words, I wanted to install a bare minimal system that was light on resources.

The Hunt begins….
When I was using ubuntu I knew that one could install a minimal command line installation(without any GUI) through alternative cd or minimal cd. So I thought, why not try it? So, I got myself a minimal cd & installed a command line version. Then I installed xorg & xfce4 desktop environment. It was definately lightweight & customizable. It did fulfill my needs. However it still crashed alot. So I told myself this won't work, I'll have to look elsewhere.

Now I was back to internet forums & they seemed to point me to Ubuntu's daddy. Yes, Debian. So, I went to their website, read a few things & everything seemed to check out. This one was also a minimal install at first & then you can install whatever you need. I downloaded their cd image & installed it. Again I installed xorg, xfce4 desktop environment & a few other applications that I use. Now dabian was definately more stable & faster than ubuntu. It did crash but not that much. But, the only problem I had with it was the packeges were outdated. Not too outdated, but still outdated. Now, I could add testing repositories & get more recent packeges but I am no veteran in linux & if something breaks, I might be able to fix it or I might not & in the end I might end up loosing some data. So adding testing repositories wasn't a wise choice. Now, having latest packeges wan't one of my priorities, but it still bugged me.

So again, I was back where I started : forums & discussion boards. This time I was considering Crunchbang, Vector, Zenwalk, Gentoo or linux from scratch. Now Crunchbang is a ubuntu derivative. It is said to be a very fast & lightweight version of Ubuntu & I love Ubuntu. But, as it is based on ubuntu, probably it will inherit the issues with graphics card & it will crash a lot. Vecor linux & zenwalk both seemed to be light & customizable but I wanted to start from a minimal installation. Gentoo has a reputation for being very customizabe. Basically because you build your whole system from compiling the source code, & creating a system specifically for your pc. The only problem with gentoo is it can take a very long time to compile & install large softwares. Linux from scratch is more like a big how to than a distribution. Because it has a very high learning curve & you will learn to build your system from scratch compiling every single module from source. Now I'd love to do that but need my pc up & running. I can't use my brother's pc for a month while I compile & build my LFS system. So I was leaning towards Gentoo. The only problem was compilation time. Now I have no experience with gentoo but I have read is some discussions that it can take whole night to compile & install openoffice suite. I wanted something like gentoo but without those long compilation times. & then I found Arch…

Archlinux is a distribution that is lightweight & highly customizable. At installation it installs minimal core packeges essential for running a command line interface & from there you can build arch into whatever you like. So I installed it & rebooted. Now I was at the command line. Before now I have used only Debian based distros. So, arch's packege manager was new for me. So I familiarized myself with the commands & started building my system. As before I started from installing xorg & xfce4. Everything was running great. Gradually I installed every application I use. The repositoris are great. I found every single software that I used to use in ubuntu plus some that weren't even in ubuntu's reposotories(like dropbox). It is very light on resources & I love every single bit of it. The greatest thing about arch is it doesn't crash. It does have some problems with graphics. If I run xserver constantly for more than 5-6 hours, sometimes the graphics becomes very choppy(you can notice it in opening/moving windows). At that time all I have to do is log out from xfce session to the command line & then start xorg again & all is back to normal again.

If you want to build similar system or need help in building something like this leave a comment & i'll create a how to & post it here.