SEARCH

How-To Geek

How to Make the Gnome Panels in Ubuntu Totally Transparent

We all love transparency, since it makes your desktop so beautiful and lovely—so today we’re going to show you how to apply transparency to the panels in your Ubuntu Gnome setup. It’s an easy process, and here’s how to do it.

This article is the first part of a multi-part series on how to customize the Ubuntu desktop, written by How-To Geek reader and ubergeek, Omar Hafiz.

Making the Gnome Panels Transparent

Of course we all love transparency, It makes your desktop so beautiful and lovely. So you go for enabling transparency in your panels , you right click on your panel, choose properties, go to the Background tab and make your panel transparent. Easy right? But instead of getting a lovely transparent panel, you often get a cluttered, ugly panel like this:

Panel before fixing

Fortunately it can be easily fixed, all we need to do is to edit the theme files. If your theme is one of those themes that came with Ubuntu like Ambiance then you’ll have to copy it from /usr/share/themes to your own .themes directory in your Home Folder. You can do so by typing the following command in the terminal

cp -R /usr/share/themes/theme_name ~/.themes

Note: don’t forget to substitute theme_name with the theme name you want to fix.

But if your theme is one you downloaded then it is already in your .themes folder. Now open your file manager and navigate to your home folder then do to .themes folder. If you can’t see it then you probably have disabled the “View hidden files” option. Press Ctrl+H to enable it.

Themes folder

Now in .themes you’ll find your previously copied theme folder there, enter it then go to gtk-2.0 folder. There you may find a file named “panel.rc”, which is a configuration file that tells your panel how it should look like. If you find it there then rename it to “panel.rc.bak”. If you don’t find don’t panic! There’s nothing wrong with your system, it’s just that your theme decided to put the panel configurations in the “gtkrc” file.

target theme folder

Open this file with your favorite text editor and at the end of the file there is line that looks like this “include “apps/gnome-panel.rc””. Comment out this line by putting a hash mark # in front of it. Now it should look like this “# include “apps/gnome-panel.rc””

gtkrc file

Save and exit the text editor. Now change your theme to any other one then switch back to the one you edited. Now your panel should look like this:

Panel after fixing

Stay tuned for the second part in the series, where we’ll cover how to change the color and fonts on your panels.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 02/16/11

Comments (26)

  1. Hatryst

    Who says Ubuntu doesn’t possess eye-candy? ;)
    Although its a bit difficult to get it done, but in the end, the results are mind blowing…!!

  2. anon

    I don’t wanna spoil your joy, but this is not “glass” effect =/
    I tried it, 2-3 months. It’s just harder read menus texts, when this is enabled. So GAH… It just looks better, maybe …. BUT it does not make panel transparent! When you move under panel, example nautilus window, you can’t see that window. It just fake transparent. I just show your’s wallpaper!

  3. Slant

    Did you mean: cp -r /usr/share/themes/theme_name ~/.themes
    ?

  4. robson

    awesome thnq :)

  5. Pretzels

    This was one of the first things I did when I installed ubuntu, even@ I believe 5.04 or 6.10.

    Very sexy though + with compiz or beryl when beryl was still supported.

    I recall the person that introduced me to ubuntu back in the day said the sad thing is the panels are not true transparent. Other than that looks good to me.

  6. Anomaly

    Didn’t work for me. I did everything as instructed but my panel now looks like the first picture in the article. The middle of the panel is a different color than the ends and no part is transparent.

  7. Tom

    Compiz does this, too. In the Compiz settings manager enable ‘Opacity, brightness and saturation’. Click the Opacity tab and enter ‘name=gnome-panel’ under Window, and adjust the Window values field to your liking. For translucency in all menus & panels, enter ‘name=gnome-panel | Tooltip | Menu | PopupMenu | DropdownMenu’ I found this a while ago on Ubuntuforums and unfortunately I don’t remember who it was, to give them due credit.

  8. Omar Hafiz

    @Anomaly: It happens rarely that with some themes you need to comment out an additional line. You need to comment the line that looks like this “style “panel” = “dark””

    Example:

    # style “panel” = “dark”
    {
    bg_pixmap[NORMAL] = “images/panel/panel-bg-dark.svg” # desktop panels
    bg[NORMAL] = shade ( 0.30, @bg_color )

  9. Matias

    But the task manager buttons remain opaque. no?

    Using oxygen-gtk theme, is absolutely transparent. Try it

    p.s. compiling with OXYGEN_FORCE_KDE_ICONS_AND_FONTS = 0 option, it respect the icons and fonts of gnome or xfce. which is the only defects that has the theme. ;)

    Regards.
    Matias.

  10. csw21

    Isn’t it just easier to right click on the panel and choose properties- then background and select transparent? Works fine for me.

  11. trm96

    I don’t know why they made it like this, in Fedora you don’t have to go through all this to do the same thing.

  12. zouk

    great transparent…nice

  13. Hamos

    Tom you and the guy who posted that stuff rock! Thanks

  14. Zack

    Looking forward to the second part!

  15. Hoffel

    you can set the panel transparent with the opacity-option of compiz too. you can find a tutorial for that at the ubuntu-wiki.

    sorry it’s german but google translate should do the job
    http://wiki.ubuntuusers.de/gnome_panel

  16. Dipesh

    Or create a transparent image and select that image as background image for the panel.

  17. Mohan

    Awesome tip!

  18. Mohammad

    I have been searching for this kind of tutorial for so long… Thanks man. Please bring us more interesting tutorials on Ubuntu in the next articles in this segment..

    YOU ROCK Omar Hafeez

  19. Kirwa

    This tutorial rocks! It worked for me in less than 30 secs flat!!

  20. AlBundy

    Hello,

    I use the Equinox Radient theme and I don’t have the line to comment :
    include “apps/gnome-panel.rc
    What should I do ?

  21. Kaleidoscope

    I’m pasting the last bits of my gtkrc file, it doesn’t have include “apps/gnome-panel.rc”

    ========================================================================

    widget “*.gtk-combobox-popup-menu.*” style “menuitem-text-is-fg-color-workaround”

    # Work around the usage of GtkLabel inside GtkListItems to display text.
    # This breaks because the label is shown on a background that is based on the
    # base color set.
    style “fg-is-text-color-workaround”
    {
    fg[NORMAL] = @text_color
    fg[PRELIGHT] = @text_color
    fg[ACTIVE] = @selected_fg_color
    fg[SELECTED] = @selected_fg_color
    fg[INSENSITIVE] = shade (0.65, @bg_color)
    }

    widget_class “**” style “fg-is-text-color-workaround”

    # The same problem also exists for GtkCList and GtkCTree
    # Only match GtkCList and not the parent widgets, because that would also change the headers.
    widget_class “*” style “fg-is-text-color-workaround”

    style “evo-new-button-workaround”
    {

    engine “murrine”
    {
    toolbarstyle = 0
    }
    }

    widget_class “EShellWindow.GtkVBox.BonoboDock.BonoboDockBand.BonoboDockItem*” style “evo-new-button-workaround”

    # Theme panel elements
    widget “*PanelWidget*” style “panel”
    widget “*PanelApplet*” style “panel”
    widget “*fast-user-switch*” style “panel” # workaround for Fast User Switch applet
    class “PanelApp*” style “panel”
    class “PanelToplevel*” style “panel”
    widget_class “*notif*” style “panel”
    widget_class “*Notif*” style “panel”

    class “TerminalScreen” style “terminal”

  22. twitter

    Very cool, thanks for sharing. Gnome panel is once again attractive to me thanks to that. I still prefer Kicker from KDE 3.5. This technique works with or without composite working and it works outside of Gnome’s own window manager.

    @Anon. For this to work like “glass”, you will have to have composite working. That is something that requires hardware support. Intel has free software that just works out of the with most distributions if you have an Intel chipset. Other hardware is hit and miss and mostly requires the user to go fetch a non free driver somewhere. Once you have that, transparency should work as you expect.

    The easiest way to see and control transparency it is in E16. This is enabled through a middle click on the desktop and the “composite” options of the settings menu. The composite settings dialog also has setting for fading, shadows and default windows opacities. Further refinements can be made in the “Transparency” settings dialog which is also accessed by a middle click on the desktop. Finally, per applications opacity settings can be made through an ALT-right click. That menu also allows override of sticky state, position, border style, iconification, etc, most of which can be made permenant if you like the result with the “remember” dialog. If you start gnome-panel in E16, you might want to disable it’s own transparency.

    The rest of the gnome desktop can be carted into E16 if you want. If you start nautilus you might want to do it with the –no-desktop option, though it is fun to move the gnome desktop in a pager, put a border on it and iconify it, you will have to reset your E16 background image and the desktop is otherwise frustrating if you don’t confine it. Inconified, it is a nice way to get easy mounting, though you can do about as well with Konqueror’s media:/ slave in 3.5 or Dolphin in KDE 4.

    Isn’t free software fun? Happy hacking!

  23. Nicol@sman

    I’m in the same situation that Kaleidoscope, and I would really like to use this feature. Help please!!

  24. Rajasekhar

    Hey I want the wallpaper used above..Its cool

  25. matt

    As above – I had this wallpaper then while changing themes, Gnome just spontaneous changed my wallpaper, and it has never been seen or found again.

    Could you please list the image or file name, or possibly even mail me the file?

  26. Emil

    Thank you very much!

Enter Your Email Here to Get Access for Free:

Go check your email!