xfce – How to fix “No window manager registered on screen 0.”

On Xfce4, the window manager xfwm4 renders the title bar and the buttons. There can be several reasons why the window manager is not running.

In my case, it wasn’t started in the first place. To verify this, check the file .cache/sessions/xfce4-session-$(hostname):0 and look for the pattern =xfwm4. If it’s missing, the window manager won’t be started automatically. To fix it, open the settings via the menu button in the bottom left corner, go to “Session and startup”, “Current Session”. Make sure it’s in the list with a priority lower than anything else. When this is the case, the fix is to simply save the session. Make sure you don’t have “save session on logout” enabled or it will be overwritten. Now log out and in again and the problem should be fixed.

If the entry is missing, you can rename the session folder .cache/sessions to .cache/sessions.broken file and log in. This will give you a new, default session but you’ll lose some settings. You can compare the two folders to restore what you lost.

I also tried to restart the WM with AltF2 but it’s not possible to type into the starter pop (the WM also manages focus). Luckily, I had a program in the background with a text field. You can still move windows by dragging them while you press the Alt key. I typed the command in there and then used the context menu to copy&paste the string into the starter.

For the future, I suggest to add a keyboard shortcut like CtrlAltWinf in the keyboard settings (“Shortcuts for applications”) which executes this command: xfwm4 --replace --display=:0.0. When xfwm4 is missing next time, you can restart it with a simple key combination.

Read more here: Source link