Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the default window manager for xfce4?

for some reason xfwm doesn't run when I run xfce4 shell.

share|improve this question
How are you starting the xfce4 shell? – izx May 28 '12 at 19:08
You use the --replace order in a command, such as compiz --replace to use Metacity in XFCE or Emerald if it's Installed.. – Uri Herrera May 29 '12 at 3:54
Already tried it with xfwm4 --replace but it doesn't last after logging off. – idgar May 29 '12 at 4:15
How are you starting the xfce4 shell? – izx Jun 3 '12 at 9:17
just choosing xfce session in lightdm – idgar Jun 8 '12 at 21:57

The easiest way I found to permanently change the default window manager is:

*Download your desired WM.

*Then go: system tools > preferences > startup applications.

*Then click "add".

*If you wanted for example to change your default WM to metacity, at "name" put "metacity" and at "command" put "metacity --replace". Click "add".

*Log out > log in.

That's it.

share|improve this answer

Doing YourWindowManager --replace means xfwm4 has already started upon login and you are now stopping it to start a new window manager...that's working but there's a quicker and cleaner way as this guy explains taking kwin as his example.

XFCE starts the window manager specified in /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml or, under xubuntu, in /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

In this file look for the Client0_Command property and edit its value: <value type="string" value="xfwm4"/> to <value type="string" value="kwin"/> (obviously, replace "kwin" with your window manager of choice) You would need to go root. You could also copy and only edit that file in /home/user/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml if you want the changes to only affect your userspace.

Because in XFCE it is common for us to save our session while logging out, don't forget to clean your session: Settings Manager->Session and Startup->Session tab->Clear saved sessions

Now you can logout and back in.

share|improve this answer

In general...

  1. Download your desired window manager if you don't already have it
  2. Run it with --replace, so for the XFCE default manager xfwm4 --replace
  3. Log out, but ensure that you have checked the 'Save session for future logins' option. The logout dialog, if otherwise unavailable, can be invoked from a command line xfce4-session-logout
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.