How can I change the default window manager for Xfce4?

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

  • How are you starting the xfce4 shell?
    – ish
    May 28, 2012 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.. May 29, 2012 at 3:54
  • Already tried it with xfwm4 --replace but it doesn't last after logging off.
    – idgar
    May 29, 2012 at 4:15
  • How are you starting the xfce4 shell?
    – ish
    Jun 3, 2012 at 9:17
  • 1
    just choosing xfce session in lightdm
    – idgar
    Jun 8, 2012 at 21:57

5 Answers 5


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

  1. Download your desired WM.

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

  3. Then click "add".

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

  5. Log out > log in.


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.

  • You could do the same from the command line using xfconf-query --channel xfce4-session --property /sessions/Failsafe/Client0_Command --set openbox --force-array (change openbox to your preferred window manager).
    – Mikel
    Feb 5, 2018 at 17:40
  • @Mikel This gives me "There are 1 new values, but only 2 types could be determined."
    – d33tah
    Feb 9, 2018 at 22:22
  • @d33tah This command worked for me with xfconf version 4.12.1: xfconf-query --channel xfce4-session --property /sessions/Failsafe/Client0_Command --type string --set "awesome" --force-array
    – josch
    Aug 11, 2018 at 9:17

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

To change it to xfwm4, the following command should work. This would change it back to the setting Xfce has by default out of the box.

xfconf-query --channel xfce4-session --property /sessions/Failsafe/Client0_Command --type string --set 'xfwm4' --type string --set '--replace'


If you prefer a GUI solution, go to:

Settings >> Desktop Settings. In the Desktop Settings dialog, change the Window Manager to the manager of your choice.

Desktop Settings, Window Manager

This works in Linux Mint 20.2

  • Greetings, as LM is not an official Ubuntu derivative, I am voting to delete this as a non-answer. If you wish to post an update relevant to Ubuntu, I'd be happy to reverse the vote. As a LM user, you are more then welcome to post LM related solution on a dedicated LM forum. Dec 18, 2021 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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