Custom CSS

Monday, July 19, 2010

Fix Java application focus issues by upgrading to wmii 3.9

I've been using wmii as my window manager for quite a while now, and I like it a lot. However, the latest version in Debian Lenny is 3.6, and it's quite dated. I was made painfully aware of this fact when I discovered that Netbeans (yea, I know; I'm forced to use it at work) would not regain focus after opening up a floating menu. This little annoyance drove me nuts and caused me to upgrade to wmii-3.9, which could've been a fairly painless process (but I like to make things hard on myself).

Firstly, installing the newer wmii is a relatively simple task: you'll want to grab the 3.9.2 sources from here (don't check them out of mercurial; it will only make the process more painful for you). Then untar the tbz and issue the following commands in the source directory:

make deb-dep
make deb

The deb will be built for you in the directory above, and you can install it at your leisure.

Secondly, configuring wmii could be a simple task, but I thought I'd try out this new fangled Ruby gem for configuring wmii. It was a mistake.

There's no documentation on which version of the gem the bundled config.yml is to work against, nor is it mentioned whether or not I should be using Ruby 1.8.7 or 1.9.1. I would assume that it would work against both, but after hours of suffering through incessant broken pipe errors and trying to optimize the configuration (switching views taking almost half a second - wtf?!), I decided to just go with the bundled wmiirc configuration.

As it turns out, the 3.9 configuration has changed, so my old wmiirc didn't work. Upon closer examination, the changes weren't that huge, and I was able to port my old settings over pretty easily.

You may see them here.


Woops. I recall the instructions say to do make deb, but that doesn't work. Try this instead:

make deb-dep
dpkg-buildpackage -us -uc -b

Wednesday, July 7, 2010

Setting up my X100e with Debian Sid

I had some fun adventures putting Debian sid on my X100e! I'm eagerly awaiting the release of the 2.6.35 kernel (which has acpi support for the X100e amongst other yummy goodies), so I decided to dist-upgrade to sid (and use the 2.6.32 kernel in sid while waiting). Oh! But what wonderful adventures there were to be had!

First of all, wmii was totally busted as it wouldn't respond to any commands involving my mod key (which is alt). I noticed (using xev) that shift+alt did not register properly, so of course wmii wouldn't respond. Here's the fix (don't ask me what it means):

setxkbmap -symbols 'pc+us+inet(evdev)+level3(ralt_switch)+ctrl(swapcaps)+compose(lwin)'

Then I discovered that I couldn't use the middle mouse button to scroll with the trackpoint. Since the xorg.conf file has mostly gone the way of the dodo, here are the magic xinput commands to get that working:

xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation' 8 1
xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Button' 8 2
xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Timeout' 8 200
xinput set-int-prop 'TPPS/2 IBM TrackPoint' 'Evdev Wheel Emulation Axes' 8 6 7 4 5

Now, I just take all that stuff and jam it into my xinitrc, then I never think about what any of it means and use wmii happily.

Of course, I still had to build the fglrx kernel modules and modify the xorg.conf to make the video card sing:

Section "Device"
 Identifier "Radeon 3200 HD"
 Driver "fglrx"
 BusID "PCI:1:5:0"
 Option "VideoOverlay" "on"
 Option "OpenGLOverlay" "off"

Section "Screen"
 Identifier "Thinkpad Screen"
 Monitor "Thinkpad LCD"
 DefaultDepth 24

Section "Monitor"
 Identifier "Thinkpad LCD"
 Option "DPMS"

Section "ServerLayout"
 Identifier "Thinkpad Layout"
 Screen "Thinkpad Screen"
 Option "AIGLX" "true"

Section "DRI"
 Mode 0666

Section "Extensions"
 Option "Composite" "enable"

Critical result: HAPPY!