2

I sometimes connect my laptop to an external monitor with an HDMI cable, and when I later unplug the cable, it causes a problem with the graphical theme in Xubuntu (14.04).

The window panes, panel, buttons etc. look ugly, and I am unable to change the theme by going to Settings Manager -> Appearance -> Style (I mean the style is on Greybird, as it should be, but it doesn't change when I click on different styles). This only seems to happen sometimes after I unplug the HDMI cable (not every time).

Screenshot of ugly appearance: Ugly windows

Screenshot of normal appearance: Normal windows

The only way I can fix it is to log out and back in again, after which the appearance is back to normal. I assume something is crashing (gtk?). Can anyone explain what might cause this, or how I could track down the cause?

Edit: I use xmonad as a window manager, and restarting xmonad doesn't seem to help at all.

  • 1
    The current gtk theme is propagated by the xfce settings daemon, xfsettingsd. It is most probably crashed. Restart it with xfsettingsd & – aquaherd Nov 26 '14 at 16:47
  • Thanks, I'll give that a try as soon as I can make the problem happen again. – hellobenallan Nov 27 '14 at 11:17
2

You need recompile xfce4-settings with this patch:

http://bug-attachment.xfce.org/attachment.cgi?id=5681

https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-331/+bug/1308105

See associated bug report:

https://bugzilla.xfce.org/show_bug.cgi?id=11107

  • 1
    Recompiling xfce4-settings with the patch seems to have fixed it properly, thanks. If others don't want to recompile, as a short-term fix restarting xfsettingsd also worked. – hellobenallan Dec 17 '14 at 13:54
3

I used to see problems similar to this on old Gnome 2 while playing with compiz, the window manager would need to be restarted sometimes, logging out & back in works, or restarting the window manager might work too. Xubuntu / XFCE uses the xfwm4 window manager, and it's got an option --replace that might work. Try:

xfwm4 --replace &

in a terminal window & see. I just tried it on my linux mint xfce and it seems to work, though I didn't have any problems so it just flickers the screen & then looks about the same. And running it without the & keeps it in the terminal foreground, a ctrl-Z suspended the window manager and seemed to mess things up pretty good, but a kill -CONT from another console (ctrl-alt-F5) got it going again.

Running it in an ALT-F2 "Launch" window might be best.

And like aquaherd's comment mentions, restarting xfsettingsd might work, it's got a --replace option too so I'd try:

xfsettingsd --replace &

It seems to work good without needing the & at the end, probably telling a daemon to run in the background is redundant? With all the different desktop environments, window managers, and settings programs it's hard to keep track.

  • Sorry I forgot to mention that I use xmonad as a window manager. Restarting xmonad doesn't help, but I guess I could try switching back to xfwm4 then back to xmonad again. – hellobenallan Nov 25 '14 at 5:12
  • xmonad might have some other options like replace or restart, but if restarting it doesn't work then I'm not sure what else it might be. If switching to xfwm4 and immediately back to xmonad works that may be just as easy, would run 2 lines instead of just one. – Xen2050 Nov 25 '14 at 5:22
  • Or maybe it's more a display problem, try going to the settings Display where you chose the monitor & resolution & refresh rate, change the refresh or resolution & then change them back & see if that resets things? – Xen2050 Nov 25 '14 at 5:24
  • I'm afraid changing the display settings didn't seem to help. Thanks though. – hellobenallan Nov 27 '14 at 11:18
  • I ran xfsettingsd --replace & and after plugging in my monitor I got the following exception: gist.github.com/jc00ke/6efaf24fa67a4df2d7e9 At least now I know what the actual error is. – jc00ke Dec 15 '14 at 21:40
0

I often hit this issue. To avoid crashing the Xfce theme (and getting the ugly buttons, etc.), I always first disable the external monitor output in Settings > Display and only then I physically unplug the cable. But this ugly workaround may fail at times.

If you have already experienced the ugly themes, this means that your xfsettingsd has crashed. You can easily revert from the ugly theme to the usual desktop appearance settings simply by restarting the daemon in a terminal:

xfsettingsd

And if this happens often enough (as, for instance, with 4.11.3), then you may want to define a launcher on your panel that will (re-)start the daemon:

enter image description here

For more details check the upstream bug report.

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.