Changing window manager from Compiz to Xfce XFWM

Compiz will no longer be maintained in gentoo portage, so I’ve had to move to XFWM, the window manager from Xfce. In a way this is a natural progression for me because I’ve been using the rest of Xfce for some time. However, XFWM doesn’t do many things that compiz can do so I’ll document the move from one to the other.

Twin view / dual head / dual monitors / dual screens

I am using NVidia’s TwinView for dual monitors. Looking at nvidia-settings it’s configured my two monitors as a single X screen, called ‘X Screen 0’.

Compiz handled windows across the screens as I’d expect. In particular:

  • It positioned windows in either monitor, depending on what space was available on the desktop.
  • It maximised a window across a single monitor only (why maximise across both monitors when there’ll be an inch and a half of black plastic in the middle?!).

XFWM is problematic and it seems I can’t achieve both of the behaviours mentioned above. I have one of two choices:

  1. If I compile gtk+ without the xinerama use flag, then XFWM will treat the two monitors as a single screen and position windows on either monitor depending on what space is available on the desktop. However, it will maximise a window across both screens, resulting in an inch and a half of black plastic in the middle of the window.

  2. If I compile gtk+ with the xinerama use flag, then XFWM will treat the two monitors more like two separate screens. It will maximise a window only across a single monitor, but it will place new windows in the same monitor as the mouse pointer, even if the monitor is already full of windows. Also, some panels (such as the Workrave break reminder) will show in both monitors. I haven’t found any way of changing this behaviour (the different placement methods in Xfce Settings -> Window Manager Tweaks -> Placement make no difference), but I’m going to leave it as is because it’s better than the alternative.

Xfce panel

If you’ve got multiple monitors and you’re using the Xfce panel, then you may need to have ‘Span monitors’ ticked in Xfce Settings -> Panel -> Display tab.

Desktop background

If you’ve got multiple monitors and you want the same background stretched across all of them, then you’ll have add configuration to Xfce Settings -> Settings Editor -> xfce4-desktop channel (as per this page on the Xfce forums: Dual monitors, one wallpaper):

Name: /backdrop/screen0/xinerama-stretch
Type: Boolean
Value: TRUE

(Bearing in mind nvidia-settings reported my screen as ‘X Screen 0’)

Keyboard shortcuts

Xfce has sufficient configuration options for keyboard shortcuts, found at Xfce Settings -> Window Manager -> Keyboard tab and Xfce Settings -> Keyboard -> Application Shortcuts tab.

Window rules

Compiz had so-called window rules, which allowed you to set the size, position, sticky / pin status and most other window options on a per-window or per application-basis (well actually on a per-pretty-much-anything-provided-by-xprop basis). XFWM lacks this feature.

In particular, I wanted to set a window as sticky / pinned to all workspaces. To do this I used Devil’s Pie.

Install the application, create a config file (I called it .devilspie) and run with the following:

devilspie -a .devilspie &

You can place this in your .xinitrc to have it start when you start X.

There are lots of good examples of config on this Devil’s Pie Documentation page. I use only the following:

  (is (window_name) "Default - Wine desktop")

Correction: It seems that the above Devil’s Pie config only works if devilspie is started after the Wine desktop is started. When Devil’s Pie is started in .xinitrc, hence before the other applications, I had to match against the window class instead:

  (is (window_class) "Wine")

Obviously this isn’t ideal, but it’ll do for me as I only run one Wine application.

Last modified: 11/03/2012 Tags: , , ,

Related Pages

Other pages possibly of interest:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top