Archive for November, 2009

Xfce 4.6: Change default settings to use workspaces more efficient

November 29, 2009

I use 10 workspaces to virtually enhance my screen’s size. My personal best practice is to have certain important applications on dedicated workspaces, e.g. thunderbird on no 2, firefox on no 3 and emacs on no 4.

If I get an email with an URL, clicking on that URL will bring up a new TAB in my running firefox. Unfortunately standard Xfce 4.6 in Karmic will switch the firefox window from workspace no 3 to the thunderbird workspace no 2.

I do not like this. I want the apps keep running on the workspace I started them on.

Finally I found this to make things work:

xfconf-query -c xfwm4 -p /general/activate_action -s switch

I really can recommend this – give it a try !


Karmic: Keyboard customizing w/o xmodmap

November 28, 2009

Using a german keyboard most of the time I have to press <Shift><7> to get a slash. Working in Unix this is not really convenient so I created an suitable .Xmodmap ages ago.

This worked rock solid until evdev was rolled out (e.g. in Hardy Heron if I remember correctly).

From that point of time my settings in .Xmodmap were gone after a Supend / Resume of my laptop.

As usual with Google’s help it turned out, that I was not the only one with this issue. But I could not find a solution.

Finally I changed the systemwide configuration file /usr/share/X11/xkb/symbols/de.

In the section xkb_symbols “basic” I changed the keys AB08 and AB09

key <AB08> { [ comma, semicolon, slash, multiply ] };
key <AB09> { [ period, colon, slash, division ] };

(On my current laptop keyboard AB08 is the best choice, but on a standard keybord its AB09, so I changed both).

For the sake of completeness: The files in /usr/share/X11/xkb/keycodes map keycodes to symbolic keynames. In my case the file evdev contains:

xkb_keycodes "basic" {
<AB08> = 59;
<AB09> = 60;

You may call the binary xev to get the keycode of any key (among other information).

Now on to another configuration task. I use my laptop frequently with a standard PS/2 keyboard, connected to the laptop via a little electronic device which connects to the laptop via USB. lsusb gives me:

Bus 006 Device 002: ID 074e:0001 Digital Stream Corp. PS/2 Adapter

For reasons completely unknown to me the key “less greater bar” (German keyboard, left to y, would normally be keycode 94) is completely dead (LEDs on the PS/2 Adapter do not even flash when pressing this key). Maybe this device was designed for US keyboards in mind, were no such key exists … In my old .Xmodmap I used the left Windows key (keycode 133) to replace the dead one.

Unfortunately keycode 133 is bound to the key , which is a modifier key in karmic. Run xmodmap -pm to check. I reconfigured the key to emit “less” and “”greater”, but pressing <LWIN> + <AltGr> I never got “bar”.

Finally I changed /usr/share/X11/xkb/keycodes/evdev to read:

// Microsoft keyboard extra keys
// <LWIN> = 133;
<AE13> = 133;
//// <AE13> = 132; // Yen

Again in file /usr/share/X11/xkb/symbols/de I added:

xkb_symbols "basic" {
key <AE13> { [ less, greater, bar ] };

This configuration works as fine as my old .Xmodmap did also after a Suspend + Resume. Unfortunately it took me quite some time to get this working. From a user’s perspective this stuff is not really well documented. Of course my changes will be eventually overwritten by an update.

If somebody knows how to make my changes on a per user basis, please share.