May 26, 2008

Over the last few weeks, I have slowly been updating the Openbox guide. Openbox 3.4.7 has been out for a little while now, and Ubuntu Hardy was also recently released. I needed to update a few sections of the guide (mainly those covering the installation of Openbox, Obconf and Obmenu, and the shutdown/reboot section). The Openbox FAQ has been changed a little as well.

But this new version of the guide is more than just an update. I have thoroughly revised the entire guide, rewritten some parts of it, and added a lot of new material. So what has changed?

First of all, it has a table of contents now :-) , which should make navigation easier and give the reader a better grasp of what areas the guide covers.

I have added a lot of new material to it: I have enlarged the sections on panels, docks, system trays, pagers and clocks. The list of ‘useful applications’ at the end of the guide is now much longer (it now contains eleven applications, whereas the old one contained three). I have tried to give KDE/Qt applications more attention, and included a section on how to deal with Qt themes in Openbox. The guide contains more information about font configuration and mouse cursor themes.

I have tried to clarify and explain the commands and applications more, hopefully making it more accessible and educational for persons relatively new to Linux and/or window managers. I have also added a lot more links to external sources of information, project websites and howtos/guides.

Here are some statistics:

The old guide contained 7275 words; the new version of the guide has 9343 words (2068 words more). The old version had 90 links to external sites, the new version has 159 links (69 links more).

The old guide was completed on 26 November 2007, and revised on 22 January 2008 (some minor changes were made in between and since then). Since it was posted, the Openbox guide has received 14,218 views (13,302 and 916 before it was moved to its own page). That is an rough average of 78 persons a day. Not the most frequented website in the world, but a lot more than I thought I would get when I wrote that guide. The entire blog has had 25,968 people over, so more than half of the views were for the guide. ‘(An) Openbox guide’ is the second most common search term that lead people to my blog (297; the first place is occupied by ‘dmenu‘ with 304 hits — it seems there isn’t that much information about dmenu available on the internet…).

Here is a picture of the stats for this blog:

And here is one for the Openbox guide alone:

Writing and maintaining the Openbox guide sometimes forces me to venture into areas I would normally not go: I don’t like docks, for example, but have tried some of them out so I could write about them. I no longer use xcompmgr and transset, but need to know how to use it as my of the readers of the guide are interested in it. I need to download, compile and install a lot of applications. One of my computers is (not exclusively) used for that. It started with a slim command-line Ubuntu Hardy install, and has now well over a thousand packages installed! I do discover a lot of interesting applications this way, though — especially old(er) ones, many of which are no longer developed, but are still handy, interesting and/or fun.

So that’s it. Go and have a look at the new guide ;-) I hope you find it useful. If you have any suggestions for improvements, or find some grave, less-grave or not-very-grave errors in the guide, please let me know. I love feedback.

The artwiz fonts, a set of bitmapped ‘futuristic’ fonts, are no longer in Ubuntu’s (Hardy’s) repositories. But don’t despair! Though installing these fonts is no longer as easy as apt-getting it, installing them manually isn’t that hard.

Download the fonts from this Sourceforge page. These are the ‘improved artwiz fonts’ that should work in Gtk2 and KDE3 applications. Once you reach the download page, you’ll see there are three versions available: German (de), English (en) and Swedish (se). These are basically the same fonts, but with different language encoding support (think ü, ö, etc.). You’ll only need one of them; pick the one you like.

If you want full ISO-8859-1 support, you can also use the artwiz latin1 fonts.

Extract the archive and move the extracted folder to /usr/share/fonts/X11/misc (the examples below use the English (en) font set)

tar xvjf artwiz-aleczapka-en-1.3.tar.bz2
sudo mv artwiz-aleczapka-en-1.3 /usr/share/fonts/X11/misc

Renew your font cache:

sudo fc-cache -f -v

Reconfigure your fontconfig settings:

sudo dpkg-reconfigure fontconfig

Enable the use of bitmapped fonts:

sudo dpkg-reconfigure fontconfig-config

Answer the questions as follows. First select the font tuning method (I chose Native):

Set the subpixel rendering of the fonts to ‘Automatic’:

And finally, enable bitmapped fonts:

Once you have restarted X, you should be able to use the artwiz fonts in your Gtk, Qt and Openbox settings.

If you want to use the artwiz fonts in conky, you no longer have to disable xft. To display conky with the artwiz font snap, use the following settings:

use_xft yes
font snap-7

Finally, if you want the artwiz fonts to also show up in xfontsel, specify the path to your artwiz fonts in the “Files” section of your /etc/X11/xorg.conf. Here is what that section looks like on this computer:

Section "Files"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/usr/share/fonts/X11/util"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/misc/artwiz-aleczapka-en-1.3/"

Restart X, and you should be able to select them in xfontsel.

Thanks to Ubuntugeek and the Ubuntu Wiki.

I’ve figured it out! You may remember I was trying to get a Exposé-type behaviour with Skippy in Openbox: move the mouse in a screen corner and Skippy launches to show you all non-iconified windows on that workspace. Well, I’ve found a solution using Xautolock.

As the name suggests, Xautolock is meant to launch a screen locker, such as xlock, automatically when the mouse cursor is inactive in one or more of the screen corners. It can, however, easily be used to launch any type of application.

Here is how you can use it with Skippy. Add the following line to your Openbox autostart file:

xautolock -locker "xte 'key Scroll_Lock'" -corners 0+00 -cornerdelay 1 &

This will launch xte (-locker “xte ‘key Scroll_Lock'”) when the mouse cursor has been in the upper right corner (-corners 0+00) for a full second (-cornerdelay 1). You can specify many more options; have a look at the very detailed man page for more info. Xautolock runs very light (80 kb on this computer), so it shouldn’t slow things down.

Xte comes with xautomation. It simulates a key press, in this example of the Scroll_Lock key, which is the key I use to launch Skippy. If you launch Skippy with a different key (the default is F11), make sure to change the above xte command appropriately. You obviously need to have Skippy running for this to work. Unfortunately Skippy is not in the Hardy repositories (though it was in the repos from Dapper to Gutsy), so you’ll have to build it from source.

And that’s it! Whenever you move the mouse cursor into the upper right corner Skippy will show you all non-iconified windows. Here is a picture:

This should also work in Fluxbox or other window managers. Pekwm still has issues with Skippy, unfortunately, so this won’t work as elegantly in that window manager.

As is probably clear to the reader of this blog, I mainly use two window managers: Pekwm and Openbox. Both look very differently on this computer, though. My Openbox session is dark blue and purple; my Pekwm session, on the other hand, looks orange and black.

Up until very recently, the first thing I often had to do after I logged into either sessions, was to edit the .gtkrc-2.0 file and (re)set the appropriate Gtk theme settings. I have suggested elsewhere to use both the xfce-mcs-manager and the gnome-settings-daemon to avoid clashing themes between sessions, but I prefer not to load these daemons.

Here is my current solution. First, I created two new gtkrc files that contain the Gtk settings I use in Openbox and Pekwm: ~/.gtkrc-2.0.Openbox and ~/.gtkrc-2.0.Pekwm. I then added the following line to my (auto)start file to overwrite the default ~/.gtkrc-2.0 file with the gtkrc file for Pekmw/Openbox:

For Openbox:

cp /home/USERNAME/.gtkrc-2.0.Openbox /home/USERNAME/.gtkrc-2.0 &

For Pekwm:

cp /home/USERNAME/.gtkrc-2.0.Pekwm /home/USERNAME/.gtkrc-2.0 &

And voilà! No more Gtk settings that conflict with the Pekwm/Openbox theme or wallpaper. This solution is probably very obvious to many, but perhaps some of you will find it helpful. This will, of course, also work if you use Openbox and a destkop environment (as separate sessions); just uncomment everything your custom Gnome/Xfce gtkrc file (as above), so that its daemon can set the themes properly.

Do you often end up with a cluttered desktop where you have several instances of the same application running? You need quick access to a particular application (often a file manager or terminal in my case) and instead of looking for the current open instance you launch a new one. After a few hours, you notice you have 4 terminals running and three Thunar windows, where one instance of each would suffice. If you often end up in a similar situation, despair no more!

Vaughn Dickson posted a very handy script on the Openbox mailing list and his wiki that either launches an application or gives it focus if it is already running.

I have modified the script a little and created a second one for Thunar. In my version, it moves the open instance of Thunar or the terminal to the current desktop (rather than moving me to the desktop where that window currently is running). You can find my Thunar script here, and my Terminal script here. If you would like to open a new Terminal/Thunar window if there is none on the current desktop, instead of moving the existing window to the current desktop, replace the last line of the script with $terminal_exec & or $thunar_exec &. Note that you need to have wmctrl installed to use this script (it should be in the repositories of most distributions).

Make the script executable (chmod +x path to the script) and assign a keybinding to it. I bound these two scripts to the keys I normally use to launch the xfce4-terminal and Thunar (Mod4+F3 and Mod4+F4). It speeds everything up enormously, since I no longer have to wait for the application to launch (or go looking for it among my open windows).

Thank you very much, Vaughn! This is a great tool :D

Judging from the search engine terms that show up in my WordPress dashboard, a lot of the visitors to this blog are searching for a comparison between either Fluxbox and Openbox, Openbox and Pekwm, or Pekwm and Openbox (search terms such as Pekwm vs. Openbox, or Openbox vs. Fluxbox are rather common).

To satisfy the desires of my dear readers, and to help those who want to know more about some window managers, I have therefore created the following table comparing four very popular window managers (or three very popular ones and one that I happen to like a lot :-)): Icewm, Fluxbox, Openbox and Pekwm.

Icewm, Fluxbox and Openbox have a wide user basis, and a very loyal following. Pekwm is a lesser known window manager that deserves more attention. I mainly use Openbox and Pekwm, and occasionally Icewm.

Please note that this table is not an indication of the most versatile, most developed or ‘best’ window manager. If a window manager lacks a feature, it may have some different strengths. Openbox, for example, does not support pixmap themes, but its theme options are the most complex and elaborate theme options of these four window managers (which makes creating themes for Openbox so much more fun!). Some features may also be primitively implemented: Pekwm supports dockapps, for instance, but its harbour is not very well developed. Nor does this chart provide an exhaustive list of features for these window manager. Icewm, for example, has a number of unique features that are not mentioned in this table (such as an email indicator and some system monitoring tools for the taskbar), and a lot of the basic features of window managers are left out.

I created the table so you could easily find out what each window manager can or cannot do. Choose whichever window manager you like best. Using one over the other doesn’t make you superior. :-)

There is a reasonable possibility that this table contains some errors. If you find any, please let me know. If I can think of more categories, I’ll add those later.

Icewm Fluxbox Openbox Pekwm
First release 1997 2001? 2002 200?
Last stable release 1.2.34
(17-04-2008 )
Language C++ C++ C C++
Based on Blackbox originally Blackbox originally aewm++
EWMH standards partial partial yes partial
Panel yes yes no no
Support for dockapps no yes (slit) yes (dock) yes (harbour)
Native wallpaper support yes yes no no
Alt-tab dialog yes (vertically and horizontally!) no yes yes
Command dialog yes (in taskbar) yes (fbrun) no yes
Xinerama support yes yes yes yes
Native (fake) transparency no yes no no
Pixmap themes yes yes no yes
Multiple workspaces yes yes yes yes
Viewports no no no yes
Add/remove workspaces no no yes no
Usable screen edges no no no (in git version) yes
Strut support no no yes no
Right-click desktop menu yes yes yes yes
Configurable client menus no no no yes
Keyboard shortcuts in menus yes yes yes no
Dynamic menus no yes yes (pipe-menus) yes
Additional custom menus no yes yes yes
Icons in menus yes yes only in client-list-menus no (only in client-list-menu of git version)
Grouping/Tabbing of windows no yes no yes
Opaque moving/resizing yes yes only resizing yes
Minimize window to tray yes no no no
Hide windows yes no no no
Tiling yes (vertically and horizontally) no no (GrowTo… actions) no (‘MaxFill’ actions)
Per-app settings yes only grouping yes yes
Configurable key bindings yes yes yes yes
Chainable keygrabber no yes yes yes
Configurable mouse behaviour Some in the preferences file yes (in keys file) yes yes
Session management/
Autostarting applications
yes yes yes yes
Confirm logout yes no yes (3.4.7) no
Shutdown/reboot control no no yes (3.4.7) no
Graphical configuration tools plenty Fluxconf, Fluxmenu Obconf, Obmenu no

Orange and Black

April 20, 2008

To my surprise I have been using the same desktop setup (wallpaper, themes, icons, fonts, panels, etc.) for nearly two months now. Though I have occasionally gone for very different colours or a different window manager, I generally returned quickly to Pekwm and the following setup:

This environment turned out to be nearly perfect for my needs. It is aesthetically pleasing but not distracting. There are no icons at the bottom (or top) of the screen attracting my attention, and all the colours go well together, even with OpenOffice, the application I rely on most for my work.

The wallpaper is Golden, by Miemo. The Pekwm theme is a slight modification of Mire v2-orange by Lyrae/Thrynk. The Gtk theme is my own creation, though it is heavily based on MurrinaSunshine. The fonts are Arial Rounded MT 9.

The icons are my own modification of the Area O (areo) icon set, originally created by the great Heylove. They were ported, (without heylove’s consent, I believe) to Gtk, but are no longer visible on gnome-look.org. I think they are still included in some theme archive over there, but can’t remember which.

I changed the colour of the theme to match my Gtk and Pekwm theme, and made a few other modifications. The original icons set used a single icon for all file types — very impractical! — so I’ve added icons for each mimetype, indicating what file extension they have. Since the icon set is also incomplete, I’ve added a few icons to have a more uniform style. I don’t own the rights to these icons, and have only modified them for personal use, so unfortunately I can’t pass them on (I am one of those strange people that take copyrights seriously :-))

The panel at the bottom of the screen is pypanel with netwmpager on the right. The applications running in the second screenshot are (clockwise, starting from the upper left corner): the wonderful file manager Thunar, Orage, Gmpc (my favourite mpd client, which is surprisingly light), and Xfce4-terminal. At the top of the screen you can see dmenu in action.

There are a few minor disadvantages to this setup. (1) I don’t have a system tray. I don’t want to use pypanel’s tray, as the icons don’t go well with the rest of the style. If I really want/need a system tray I generally load docker in the harbour, though I have learned to work without a system tray most of the time. (If there were a text-based system tray (ttm-style), I might try to integrate it into my desktop, but I don’t believe something like that exists). (2) I still haven’t figured out how to launch OpenOffice with the Gtk widgets in Pekwm (apart from ooffice –widgets-set gtk), so I still have to launch it from the terminal. “export OOO_FORCE_DESKTOP=gnome” works in .bashrc, but not in Pekwm’s start file.

I’ve heard the Ubuntu developers want to create an orange and black Gtk theme for the next Ubuntu release (8.10). If it looks like this, I won’t complain.

I’ve recently found a very comprehensive and informative overview of window managers for Linux: ‘The Window Manager Report’.

I’m sometimes amused by the number of persons that still direct new users of Linux for more information about window managers to Xwinman.org (where Window Maker still heads the charts as most popular window manager and Openbox or Pekwm aren’t even choices in the poll). I used to think that was the only overview of window managers available (other than Wikipedia), and was therefore very pleasantly surprised to find this excellent site.

Giles Orr, the creator of the website, gives a comprehensive table of window managers, giving a brief description, linking to its homepage, Wikipedia, and Freshmeat page (where applicable), and mentioning when the wm was last updated. You can sort the table according to your preferences (name, version number, release date, etc.).

He also provides a Bloodlines chart, showing who borrowed ideas and/or code from whom.

If that wasn’t enough, he also created a table of the memory usage of window managers, indicating how light or heavy a window manager runs as well as on how many libraries it depends. If you only want a window manager written in a particular language (C++, Python, etc.), you’ll be happy to know that he also has a page for that.

The site is regularly updated. The last update for the window manager overview was done yesterday (April 7 2008). Giles Orr started with reviews of window managers last year, but hasn’t added any lately.

This site has helped me discover some unknown window managers, as well as a few neat ‘helper applications‘ (even, or especially, if that page mentions some archaic apps). Many thanks Giles! :-)

Thanks to the infinite knowledge of Mikachu, I’ve finally figured out how to switch window managers while running Openbox without having to terminate any running applications. Using the Openbox ‘restart’ action, you can launch a different window manager. To do so, add the following to your menu.xml file (using Pekwm as an example):

	<item label="Pekwm"> 
	<action name="Restart"><command>Pekwm</></> 

You won’t be able to do this through Obmenu, but text files aren’t that scary. ;-)

For all you Pekwm enthusiasts: you can do the same thing easily in Pekwm using the RestartOther action ({ Actions = “RestartOther openbox” } for example). I’m not sure how that works in other window managers; you might not be able to switch back to Openbox without logging out.

PCMan, one of the developers behind the LXDE project, has just released a first version of LXappearance, a simple application to change the Gtk theme, icons and fonts when outside Gnome or Xfce.

The application is very straightforward. There is a tab to change the Gtk theme, one for the Icons and one for ‘Other’, which at the moment only allows you to change the toolbar style of Gtk applications (icons, icons and text, only text, etc.). It has a preview window which updates automatically when you select a different theme, but changes are only applied when you press the ‘apply’ button.

Here are a few screenshots of the application in action:

As far as I can tell, this is now the best theme-changing application available for window managers. Unlike its predecessors, gtk-theme-switch and gtk-chtheme, LXappearance can set the icon theme for you as well, and the instant preview of the theme is well implemented. You can also install new themes with it, though I admit I haven’t tested that yet. The only issue I’ve had so far, is that the icons and Gtk themes are not listed alphabetically in LXappearance (as you can see in the screenshot). I’m not sure what the logic is behind the listing, but it isn’t very handy.

Note that LXappearance overrides your ~/.gtkrc-2.0 file, where it stores the Gtk theme, icon, font and toolbar settings, so be sure to back that file up if you have some settings in there you’d like to keep. I also had to uncomment the icon settings I had specified in my ~/.gtkrc-2.0.mine file; for some reason they overrode the settings in ~/.gtkrc-2.0.

This is a great addition for those who use window managers without desktop environments, but want a light and attractive way to change their Gtk settings. I’ll be updating the Openbox guide soon.


Get every new post delivered to your Inbox.

Join 92 other followers