Root applications looking bad in GNOME? Set the proper theme.

Well, this How-To is very straight forward and solves a bad problem we all have in Ubuntu. It cannot be fixed by default because of the existence of a root user.

As you surely know, in Linux there often is a root user and then all the others users (The root user is the administrator, the others are just common users).
This is not true for some distributions: in Linspire, for example, the normal user is always an administrator too. But in Ubuntu there is this distinction and IMHO it is the best way to administrate a computer, specially for security reasons.

The problem in Ubuntu (GNOME) is that when you set a theme in your normal user configuration, that theme is not automatically setted in root applications too (Those you call with a sudo or gksu, like synaptic), so, if you open for example synaptic, even with a very nice theme setted for your user apps, synaptic will still look horrible, with that grayish look like computers of 50 years agoo….

There’s a simple and very quick way to set root applications so that they ALWAYS look as your normal applications, reguardless from the theme you are using. Just open a terminal and run:

sudo ln -s /home/<insert your username here>/.themes /root/.themes
sudo ln -s /home/<insert your username here>/.icons /root/.icons
sudo ln -s /home/<insert your username here>/.fonts /root/.fonts

And the trick is done. Try opening synaptic and you’ll be pleased to see that it now uses your user theme!

NOTE: In some systems, don’t know why, this trick already works so, to check if you need or not to apply this how-to, just open synaptic, then open the themes manager (System –> Preferences –> Themes) and change theme. If the synaptic’s window theme changes than you are already OK!

This How To refers to an advanced guide you can find here.

If you are really really lazy, you can also run from a terminal window:

sudo gnome-theme-manager

and pick up a theme with this graphical tool but remember: using the command line will make sure your root applications keep it up with the themes from your normal user session. Using sudo gnome-theme-manager will change the root theme to exactly A PARTICULAR THEME, so, if you change theme in your user session, you’ll have to run sudo gnome-theme-manager again and set another theme. Better using the command line and creating some links, right ;P ?

12 Comments:

  1. I’ve just done it, but synaptics still looks terrible… maybe something related to using Debian 4 Sid?

  2. Ok, that sometimes happens for as much as I know.
    Try copying you thmes from ~/.themes to /usr/share/themes
    You can do it graphically with a sudoed nautilus (From terminal):

    gksu nautilus

    or you can run from a terminal:

    cp /.themes/* /usr/share/themes

    Let me know if this did the trick 😉

  3. Ah, if this doesn’t work, try running:

    sudo gnome-theme-manger

    and pick up a theme. This has to work for sure.

  4. uhm, it’s manager not manger… sorry.

  5. Damn… I’ve set a theme with gnome-theme-manager and still I get the ugly gray window for gksu applications… Starting to think I’ll have to live with that!
    Thanks for the tips anyway!

  6. wow, that’s weird! Sorry man, never heard of something like that. Wanna try a ride on the Debian / Ubuntu Forums? It could be very helpful, there’s no problem they couldn’t help me to solve until now.

  7. I’m sure gonna try that, my very dark theme look ridiculous that way! Hehehe! Thanks for the support dude!

  8. It looks like I was far too asleep last night. My links were pointing nowhere, so I fixed that and now it works! Thanks a lot!

  9. Nice that some problems can be solved immediately. Thanks for that one 🙂

  10. Pingback: links for 2008-07-16 « My place

  11. I don’t see why anyone would want apps running as root to appear the same… the ugly look you get in root apps is a subtle reminder that you are running with elevated privs. I am much more cautious when I see the ugly gray look instead of brushed metal.

Leave a Reply