In which greywulf digs deeply into Linux config files and whatnot. Tread carefully, dear reader.
Over the years I’ve formulated my own personal theory about what the perfect desktop interface should look like. Perfect for me, of course. Your needs are quite likely to be very different, so bear with me on this one.
Here’s the theory, in short: Windows is upside down.
Perhaps I should explain.
The perfect desktop interface do the following things:
- Have the taskbar at the top of the screen. Our eyes naturally travel down the display, so our work and content (y’know, the important stuff) should go right to the bottom of the screen. The interface itself should be in the least obtrusive and noticeable place on the display; the top. That means you have to consciously glance up to break from your work pattern rather than it keep catching your eye. At the same time, it should always be visible so that no additional keystroke or mouse gesture are needed just to check the time, see if an application is running or whatever.
- The taskbar should be as small as possible while still be comfortable to check with a glance. Mine, for example, is just 19 pixels thick. That’s about half the size of the standard Windows XP taskbar.
- The desktop interface should take up as little memory as possible, be 100% rock solid stable and be an unobtrusive as possible; these go without saying, though seem to fly in the face of modern OS design.
- The windows themselves should have a small titlebar, but this disappears when the window is maximized; in essence, the taskbar becomes the titlebar for maximized windows. All of the usual functions of the titlebar (name, restore size, close) as replicated by the windows’ entry in the taskbar anyhow, so why duplicate and waste valuable screenspace for a maximized application?
- Multiple workspaces are available via a mouse-click or simple key combination. For example, I use four workspaces arranged in a two-by-two grid, and use Control+Up/Down/Left and Right to switch between them. This makes it simple to move applications out of the way if they’re fire-and-forget apps, or if you’re working on multiple projects at the same time. I tend to have one workspace with Opera, a Terminal and a File Manager open, and another for coding or graphics work with a couple free for other stuff.
- Every mouse action should have a key combination. I can maximize my windows with a mouse click, or press Alt-F11 to toggle between maximized and regular fit.
It’s been my long-term goal to find a way of getting all that functionality in one package for Ubuntu Linux, and I think that (at last!) I’ve found it. The default GNOME interface comes close but takes far too many system resources. While I like the standard Ubuntu look, the two-panel design does nothing for me at all, and it’s the first thing to go. GNOME doesn’t want to lose the titlebar for windows at all without some arcane devilspie voodoo, and that’s just too much of a kludge for my liking. KDE is too much gloss and not enough productivity, and other, lighter window managers such as fluxbox, fvwm and xfce just don’t do it for me, so………..
It’s time for some pretty pictures, don’t you think? Click for larger image, as ever.
Here’s my new, shiny desktop layout, complete with pretty wallpaper courtesy of http://www.gnome-look.org. The gnome-panel taskbar is at the top of the screen just as nature intended with a single menu icon alongside quick launch buttons for the gnome-terminal and Opera. At the other end of the task bar is a clock, workspace switcher, and notification area. The rest of the bar is reserved for the tasklist.
It’s worth noting that this is still GNOME, but using openbox rather than the far more weighty metacity as the underlying window manager. We’ll come onto that in a while.
Here’s a terminal open and ready to play, complete with obligatory tinted transparent effect. My little laptop’s integrates graphics card (Unichrome. Ugh!) won’t handle the advanced whizzbang of compiz and suchlike, so this is plain, functional and fast default X-Windows goodness.
The font I’m using in the terminal, btw, is call Domestic Manners. Gorgeous, isn’t it?
Just to show what I mean by “no titlebar when maximized”, here’s the terminal doing just that. No functionality is lost by ditching the titlebar, but you can a good 20 pixels or real estate. That’s like a screen upgrade, for free
To restore the application back to it’s default size (I tend to work maximized all the time anyhow), either right-click the taskbar entry and select “Unmaximize” or press Alt-F11. Either is good.
Now, onto how to set all this up on a Linux box of your very own. These instructions are for Ubuntu, but they should adapt to pretty much any Linux distro out there. Just replace the download instructions with the suitable equivalents for rpm, yum, or whatever.
Assuming you’ve got a working GNOME setup, type
sudo apt-get install openbox openbox-themes obconf
into a terminal window, then enter
This ditches the memory hungry metacity and replaces it with the lighter, smarter openbox. On my system, replacing metacity with openbox saves 30 to 50Mb of memory. Wow!
Type obconf and select a suitable theme. I use the real-milk theme, for example.
Next, setup a top gnome-panel as detailed above and remove the bottom panel, if any.
Openbox stores its setup in a single .xml file called ~/.config/openbox/rc.xml. Here’s mine for reference. Either use it as-is or copy-and-paste as required. The important sections I’ve changed are how openbox handles window maximization and the keyboard shortcuts.
Find the section labeled
Replace the Left Click option as follows:
<mousebind button="Left" action="Click"> <action name="ToggleMaximizeFull"/> <action name="ToggleDecorations"/> </mousebind>
Add another keybind to do the same with a press of Alt-F11 (or whatever you prefer):
<keybind key="A-F11"> <action name="ToggleMaximizeFull"/> <action name="ToggleDecorations"/> </keybind>
While we’re at it, I also add in keyboard shortcuts to bring up the Application menu with a press of the Windows key, and give me a Run application dialog on Alt-F2:
<keybind key="Super_L"> <action name="execute"><execute>gnome-panel-control --main-menu</execute></action> </keybind> <keybind key="A-F2"> <action name="execute"><execute>gnome-panel-control --run-dialog</execute></action> </keybind>
Finally, change the keyboard shortcuts to switch workspaces from the finger-yoga inducing Control-Shift-Up/Down, etc to just Control-Up/Down, etc:
<keybind key="C-Left"> <action name="DesktopLeft"> <dialog>no</dialog> <wrap>no</wrap> </action> </keybind> <keybind key="C-Right"> <action name="DesktopRight"> <dialog>no</dialog> <wrap>no</wrap> </action> </keybind> <keybind key="C-Up"> <action name="DesktopUp"> <dialog>no</dialog> <wrap>no</wrap> </action> </keybind> <keybind key="C-Down"> <action name="DesktopDown"> <dialog>no</dialog> <wrap>no</wrap> </action> </keybind>
Phew. It’s all in the rc.xml I’ve uploaded anyhow.
Finally (really finally, this time), close all the windows on your Desktop and go to System->Preferences->Sessions in the taskbar menu. Select the Session Options and click “Remember current running applications”. That’s locked GNOME into using openbox from hereon.
There you have it.
My desktop nirvana.