Desktop forgets theme?
I am running Ubuntu in VirtualBox (on a Windows 7 host). Several times now, the top-level menu bar, the task bar — and seemingly every system dialog — have forgotten the out-of-the-box "Ambiance" theme they conform to when I first installed the system. Window captions still preserve the theme, but pretty much nothing else does.
I have searched high and low on Google for assistance with this problem. Everything I've found suggests either running some gconf reset or deleting .gconf* .gnome* and other similar directories. I have followed all this advice and nothing works. I still get a boring Windows-95-style gray 3D look and feel. On previous occasions, after much messing around I've given up and rebooted the VM instance, and been pleasantly suprised to see the original "Ambience" theme restored throughout the UI, but invariably it disappears again some time later, usually after a reboot, so I can never figure out what I did that broke it.
Here's a sample from Ubuntu's site of what I want it to look like.
And here's a screenshot of my system as it currently looks.
Also note that my GNOME Terminals normally have a nice purple semi-translucent look, and as can be seen from the screenshot, they are now just a solid matte white.
This last time (just yesterday), trying numerous combinations all the usual tricks and rebooting several times hasn't fixed it, so here I am on SU wondering:
How do I recover the out-of-the-box theme for my Gnome/Ubuntu desktop, noting that blowing away all config files — as suggested in many places online — fails to achieve this?
It might help to know that it seems to fail either after I resize the VM instance, forcing the Ubuntu desktop to resize itself, or after I play around with Compiz settings. I haven't been able to figure out which of these it is, and it could be neither. Given the amount of pain I have had to go through to get things back to normal (and given that I am at a loss as to how to do so), it has proven difficult to definitively isolate the cause.
Solution 1:
@zpletan's answer lead to a bit of hunting around, which quickly unearthed what seems to be the root cause of my problem. It's detailed in Ubuntu Bug #574296. In summary, my Core i7 system with an SSD starts everything with sufficiently different timings that gnome-settings-daemon runs too early, bails, and leaves me mostly with a stock GTK theme.
A short sleep in /etc/xdg/autostart/gnome-settings-daemon.desktop
fixes it:
Exec= bash -c "sleep 2; /usr/lib/gnome-settings-daemon/gnome-settings-daemon"
Solution 2:
I couldn't fix this problem with any of the suggested answers (the currently accepted answer worked sporadically, but usually did not work for me). I tried increasing the sleep time by a lot and it still wasn't working consistently.
However, one of the answers did point to a bug that tracks this issue, and I found a comment on the bug that solved it for me.
Here are the key bits:
First, create a bash script (I named it /etc/xdg/autostart/gnomesettingsdaemonfix.sh
)
#!/bin/bash
pid=$(pgrep gnome-settings-)
while [ -n "$pid" ];
do
pid=$(pgrep gnome-settings-)
sleep 0
done
exit 0
Make sure it is executable (run chmod +x
).
Then edit /etc/xdg/autostart/gnome-settings-daemon.desktop
Change the Exec
line to:
Exec=bash -c '/etc/xdg/autostart/gnomesettingsdaemonfix.sh;/usr/lib/gnome-settings-daemon/gnome-settings-daemon'
That seems to have fixed it so far for me.
Solution 3:
Press Alt+F2 (Run Application) and run the following:
gksudo gnome-settings-daemon