Saturday, February 16, 2008

Stop XFCE from Automatically Switching Windows to Different Desktops

My email reading and surfing habits follow a lazy model: I like to click on a link and load it in the background while I finish absorbing the current context (email, webpage, IRC snippet, etc.). When I'm finished with the current email or webpage, I then go back and check out what I clicked. This was all fine and dandy while I was using the Gnome desktop, but I recently changed to XFCE and some of the defaults are a little different.

The problem: I make use of multiple (virtual) desktops for splitting up my computing activities. I group my active applications together in the 2nd quadrant (think unit-circle quadrants) and my email in the 3rd quadrant. When I click a hyperlink in my email quadrant, XFCE moves my web browser to the 3rd quadrant. This is annoying.

I finally ascertained the appropriate action when I asked on the #xfce channel. The solution is a hidden option (so called since it is not yet accessible via the GUI) so it's terminal time. The option is activate_action=none and it gets put into ~/.config/xfce4/xfwm4/xfwm4rc.

$ echo activate_action=none >> ~/.config/xfce4/xfwm4/xfwm4rc

After restarting XFCE (otherwise known as logging out and back in), windows no longer switched desktops automatically! Exciting! Thanks #xfce!

I'm still not sure what was wrong with my google-fu, but after the fact, I finally found the documentation of this option in XFCE's svn repository. (Search for activate_action.)

activate_action=bring|switch|none When set to bring, the window manager to bring the window on the current workspace, switch will switch to the window's workspace, and none will simply do nothing but set the demand attention flag on the window.

Hello World

I am a geek, and every good geek starts off projects with the obligatory Hello, World! Hello, World.