SaltyCrane Blog — Notes on JavaScript and web development

Using wmii with Gnome

Thanks to Glyph, I can now use wmii as the window manager for Gnome. I like wmii because it makes good use of screen real estate, is keyboard-navigatable, is scriptable1, and uses minimal resources2.

It is possible to use gnome-panel within wmii-- just press MOD+P gnome-panel RET. And you can manually fine tune your .xinitrc or .xsession by adding your required stuff such as gnome-power-manager and nm-applet. (This is what I had been doing (and may continue to do depending on how this full on Gnome thing works out).)

If, for some strange reason (e.g. you want to use an annoying3 Adobe Air application), you want to use the full Gnome desktop with wmii, that is possible also. To do this, start up Gnome and go to System, Preferences, Sessions. Uncheck Window Manager, then click Add and fill in the path to your wmii executable. Glyph also suggests running gconf-editor and turning off /apps/nautilus/preferences/show_desktop. After logging out and logging in, you should now have wmii as the window manager for Gnome.

Note, I've only used this Gnome+wmii configuration about a day, so I'm not sure if I will keep it or not. I have found TweetDeck will load up but has some disappearing act problems. TwitterLocal on the other hand, seems to run fine.

Update 2010-07-18: I only used the full Gnome+wmii configuration for a couple days before going back to pure wmii. However, I am retrying this configuration with Ubuntu 10.04 Lucid again since I have a more powerful computer now and I need extra non-hacker type stuff to just work without trying to figure out which program provides it... So it looks like Ubuntu 10.04 no longer has the Sessions item in the Preferences menu. I tried using gconf-editor and changin /desktop/gnome/session/required_components/windowmanager from gnome-wm to the path to my wmii executable but that didn't work. If you know how to do it, let me know.

  1. Yes I have written one script for wmii. It allows me to change column widths using the keyboard instead of the mouse. It's a bit of a hack, but maybe I will make another post for that sometime. Update 2009-04-12: here is that post
  2. Of course, using Gnome with wmii negates this advantage. When I bought my Dell 530N with 1GB of RAM, I had planned to purchase more RAM separately because it was so much cheaper. I suppose I ought to do that sometime. Of course at work, my computer had only half a gig of RAM and I was running out of memory continually.
  3. I call Air annoying because it only works in Gnome or KDE (and to add another alliterative adjective). Otherwise, I don't know much about it.


#1 Marco R. commented on :

Hi sofeng, I'm very curious about how did you solved the problem of controlling column widths of wmii clients through the keyboard. I've tried to look at how the files of the virtual file system are modified after resizing clients with the mouse and, at least in wmii-3.6, it seemed quite complex to manage it by scripting in the wmiirc.

Hope you write something about that soon!

#2 Eliot commented on :

Hi Marco, Thanks for the comment. Yeah, it wasn't as straightforward as I hoped it would be. My solution is a bit of a hack: I grow the window, measure it, then grow it again to the correct size. I'll try to post the code up here in a couple days. Glad to know someone else is interested in this also.

Update: I added the post on scripting wmii column widths. Here is the link: