Setting up XFCE+Kwin

Not sure if this is the right category, I took a hint from this great post by @fbodymechanic: Easy Setup: Endeavour XFCE + i3 tiling window manager (check that one out too!)

(Very WIP, please test in a virtual machine).
This is a guide for setting up XFCE, but with KDE Plasma’s Kwin window manager instead of the default Xfwm4.

Why would you want to do this?
Kwin is very actively developed (unlike Compiz), and it can give you Compiz-like effects. I’ve also found it’s compositor to completely eliminate tearing, like Picom but unlike Xfwm4’s inbuilt one, which can need a bit of tweaking. It also just feels quite smooth, and has scripting capabilities and a quite large ecosystem.

Installing enOS
Grab an enOS iso and burn it to a flash drive. Run the online installer. When you get to the Package Selection part, select the XFCE desktop. Then, boot in and run sudo pacman -Syu systemsettings kwin.

If you have an install going, sudo pacman -Syu xfce4 kwin systemsettings. Maybe also network-manager-applet and Blueman or Blueberry, if you need those (I do).

Replacing the WM
Okay, now we have all the packages we need. First things first, we need to set up KWin. Now, there is a setting somewhere in /etc to set XFCE’s WM, but that ends up in a broken setup. So does adding kwin_x11 --replace to startup. What’s broken is that cursors may not be set properly, the XFCE panel may look weird, it may take forever to load… I actually am not entirely sure why. But my suspicion is that Kwin relies on Plasmashell to initialize everything, whereas the XFCE “shell” (which is just xfdesktop + xfce4-panel) doesn’t do that, but rather xfwm does. If you do the former way (editing file), Xfwm is never called. If you do the latter (autostart), XFCE will be too eager to load it, before it gets to load Xfwm.

Now that you’ve read all of that (or not), the solution is quite simple. We must first start XFWM, which will set this stuff up, then have Kwin take over. Since XFCE’s autostart panel has a simple parser, and it doesn’t parse shell script, let’s make a simple script. sudo vim /usr/local/share/

xfwm4 --replace & disown
kwin_x11 --replace

Make it executable: sudo chmod 755 /usr/local/share/
Then, open “Session and Startup” from the XFCE Settings Manager (or from the Menu). Go to the application autostart tab, and press the +:
Set it to execute (name and description don’t matter, just make sure the Command field points to it):

( btw, you could give a better name :wink: )

Now, for good measure, reboot. Log in, and be presented with, tada… Xfce with Kwin!

QT configuration
easy: append QT_QPA_PLATFORMTHEME=kde to /etc/environment, you will need to reboot as it is sourced upon boot (and the variables are handed out to anything that is run). then open “KDE System Settings”, change the colorscheme to something matching your GTK theme.

Use the Whisker Menu, it’s excellent. And if you do, add a very simple rule to Kwin. Open KDE System Settings and go to Window Management > Window Rules. Press Add new, and set it up like this.

This way, it’ll always be focused, the focus won’t go to another window.

Use ksuperkey, bind Whiskermenu to Alt+f1, then you can use other shortcuts with Super without triggering the whiskermenu (if you bind it to super).

Play with “Workspace Behavior > Desktop Effects” in the KDE settings. I like Scale, with an open & close scale of 0.96 and a duration of 100ms. Feels smooth yet snappy.

As far as Kwin scripts go, one I like is Gnome like behavior is pretty damn nice.

Reminds me about Virtual Desktops, if you don’t use that script, you can configure a static number of workspaces in KDE system settings.

sudo pacman -S qt5-tools, then in Keyboard (in XFCE’s Settings; it’s keyboard daemon runs alongside Kwin’s, which doesn’t want to be configured within non Plasma environments, so you use it), set left/right workspace shortcuts:

Ctrl-Alt-Right: qdbus org.kde.KWin /KWin nextDesktop (if it asks to keep or change the shortcut, change it):


Do the same with Ctrl-Alt-Left, but bind to qdbus org.kde.KWin /KWin previous Desktop.

This was a very long post, and I wrote it in haste, therefore there are probably many mistakes. Please test in a VM. Ask below if you have any questions, please!


Excellent tutorial. Worked flawlessly. Thank you!

5.14.8-artix1-1 x86_64
Xfce 4.16.0
Artix Linux

1 Like

My EnOS xfce doesn’t start. It stucks at splash screen and after 2 or 3 mins it shows black screen with cursor. Any idea why is this happening?

you should open a new post, as this is the wrong part and old

1 Like