Skip to content

A Fun (De)Tour Into XFCE4ยค

I tried to see if I can get xfce4-panel to work with DWM. There is a polybar patch for dwm but it's:

  • A big diff and big patches are technical depth you pay when you add more patches to dwm, seen that with the systray patch colliding with slcolors before.
  • Also I don't know polybar but have already all the xfce4 packages on the system - sometimes you still want graphical programs for stuff.

Did not find much successfull attempts getting it to work so I tried myself.

The naive attempt revealed this:

~/inst/dwm โฏ xfce4-panel   
xfce4-panel: Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

So I did this

~/inst/dwm โฏ xfce4-session

and did get crazy output, tons of funny windows opening, cpu 100% and the system completely screwed.

No, no video of this, do NOT want to reproduce the mess I created ;-)

Symptomsยค

  • Restarting dwm, then even rebooting showed the login screen not going away, even after logged in
  • Opening a terminal, then exitting it, would still show that terminal open :-)
  • An xfconf process at 100% cpu...

Total confusion. Reboot. Still the same. What that that session manager do to my dwm setup?!

Finding the Root Causeยค

After some digging I found that variety, the wallpaper setter ran amok. No wallpaper -> no going away of the sddm login window, or re-rendering of the background after exit of the terminal.

Why did variety run amok? This showed what it does, when setting WPs.

for i in $(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -E -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$"); do

Here is xfconf. I ran the query myself. Output: Over 2000 different wallpaper settings for the /backdrop sub tree.

Now I began to understand :-)

  • dwm has not just 9 workspaces - it has 2**9! All it's possible tag combis are announced to EWMH as different workspaces.
  • xfce4 allows to set different wallpapers per workspace
  • So when I started the xfce4 session manager within dwm, it asked X11 regarding the number of workspaces - and created an entry for each of them - per monitor :-)
  • Which, as a symptom, was
    • completly screwing up variety's wallpaper setting loop
    • sending it into a timeout after 5 seconds
    • never actually setting the wallpaper
    • leaving me the user thinking dwm completely is disfunctional :-)

The Cureยค

Using xfconf-query I recursively remove the whole /backdrop tree, then set it to a sane value using xfce4-settings-manager, within a xfce4 session. Done, all worked again, fine :-)

Back to my CPU problem with the status bar...

Back to top