I've tried two different full desktop environments under Linux: KDE and GNOME. I used KDE quite a lot up to and including the last 3.5 release. When KDE 4.0 happened I jumped ship and configured myself a nice little Fluxbox environment. I always had one problem with Fluxbox, though, and that was that GTK Emacs rendering was too slow; often when scrolling through a file, the display simply wouldn't update quickly enough to be able to see the contents as it moved. The only solution I had for this was to use GNOME, in which GTK Emacs rendering was fine. This all very well except for all the bloat of GNOME; it takes quite a while to start and provides lots of features that I never use.

Yesterday I realised (can't think why I hadn't thought of it before) it might be Metacity that makes GTK Emacs rendering work and I could just use Metacity by itself without the rest of GNOME. So I found out how to start an X session with just Metacity, fired up Emacs and sure enough, it works beautifully.

So I've now abandoned full desktop environments in favour of simple window managers with a few handy applications.

The main thing I had to learn was how to configure a custom X session. It turned out to be a simple matter of creating an ~/.xinitrc script which starts any programs I want running in my session and then calls exec metacity. I also symlinked this to ~/.xsession (I'm not sure which actually does the business for GDM). Then from GDM I choose 'Run Xclients script' and I'm logged in to my custom session.

My ~/.xinitrc file looks like this:

#!/bin/bash

xset b off & xset r rate 195 60 & synclient TapButton1=1 &

export OOO_FORCE_DESKTOP=gnome

export LANG="en_GB.UTF-8"

export LC_ALL="en_GB.UTF-8"

export LANGUAGE="en_GB.UTF-8"

export LC_CTYPE="en_GB.UTF-8"

xmodmap ~/.Xmodmap & gnome-settings-daemon &

gdesklets --no-tray-icon start conkeror -daemon &

exec /usr/bin/metacity

Metacity allows me to configure keybindings using gconf and setting the /apps/metacity/global_keybindings and keybings_commands keys. So I have bindings for my xterm, for starting the Emacs client, for Conkeror, for gRun (a GTK run dialog to replace the one I lose by not using GNOME), for hibernating, and for logging out (just a script which quits Emacs and kills metacity).

I've also tried using gDesklets just to get a pretty clock and weather report, but I'm not sure these are really necessary.

One step closer to desktop heaven...

Posted Sun 10 Jan 2010 23:18:00 GMT

I've been having a few problems with resuming from suspend to disk (or hibernate) recently. Essentially, I end up with a blank screen after resuming. Occasionally, I can switch VT (using Ctrl Alt F1 for example), but more often I can't do anything but a cold reboot.

At the same time I've also noticed some changes in xrandr (the screen resolution switching tool for X); different resolutions are available for my external monitor and the displays' names have changed (from LVDS to LVDS1 for example).

This lead me to wonder if the two things may be connected. It turned out kernel mode setting has been enabled on my Debian unstable system. And I'm guessing that this may be causing problems with X resuming correctly.

I've altered /etc/modprobe.d/i915-kms.conf to contain:

options i915 modeset=0

and (as I'm now using GRUB2) added "nomodeset" to GRUB_CMDLINE_LINUX in /etc/default/grub. (For old GRUB, it used to be a case of editing /boot/grub/menu.lst.) I'm not sure whether both of these changes are necessary (I only know that the nomodeset option by itself wasn't sufficient), but now kernel mode setting has been disabled and resuming from hibernation seems to be working OK again.

Posted Wed 20 Jan 2010 00:14:00 GMT