Howto: Set a background image for your panel

October 12, 2007 at 6:33 pm | Posted in tips and tricks, xubuntu | 18 Comments
Tags: , , , ,

Just like in GNOME! …With a little bit more effort, of course.

So, why would somebody want a background image for their panel? Well, for one, a nice gradient image on the panel can really complete the feel of your desktop. For another, using a section of your wallpaper for a panel background can make your desktop feel more integrated.

For instance, here’s one of my panels with a background image the same as my wallpaper, to make it feel more like a dock:

My panel

One image I recommend using is the OSX menubar image. Scroll down and choose the image for your desktop resolution.

Sounds good? Let’s get started!

1) Rename the image that you want to background.ext (ext being the file extension. ex: png, jpg, etc.). Put the image in your home folder. (actually, you can name it whatever you want, but for consistency, we’ll leave it as background.ext. Make sure it’s in your home folder though!)

2) Open up the terminal (Xfce Menu > Accessories > Terminal), and create and edit a GTK configuration file:

touch ~/.gtkrc-2.0
mousepad ~/.gtkrc-2.0

3) Copy and paste in it the following:

style "panel"
{
bg[NORMAL] = "#FFFFFF"
bg_pixmap[NORMAL] = "background.ext"
fg[NORMAL] = "#FFFFFF"
}

widget_class "*Panel*" style "panel"
widget "*Panel*" style "panel"
class "*Panel*" style "panel"

(Again, .ext, of course, being the file extension).

4) Save the file and exit. You’ll have to log out and in again for the changes to take effect. If you don’t want to do that, run the following in the terminal:

killall xfce4-panel
xfce4-panel &

to complete the changes.

Have fun with your panel!

(Special thanks to crimesaucer at http://ubuntuforums.org/showpost.php?p=3517612&postcount=396 for this tip!)

18 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Nice tip, however, if your computer can handle it and you want to show your wallpaper in your panel, it might be better to enable compositing in “Window Manager Tweaks” under Applications->Settings from where you can also enable transparency. 🙂

  2. Ah, yes. The problem is is that with transparency, the icons go transparent too…which I don’t want.

    The panel is actually set at 50% transparency.

  3. […] Jonathan Lapper wrote an interesting post today onHere’s a quick excerpt… in your home folder though!) Open up the terminal (Xfce Menu > Accessories > Terminal), and create and edit a GTK configuration file:. touch ~/.gtkrc-2.0 mousepad ~/.gtkrc-2.0. 2) Copy and paste in it the following:. style “panel” … […]

  4. Any idea how to do this to just ONE of my panels? That would be pretty nice.

  5. I tried, but I couldn’t find out how. 😦

  6. Heh. Thanks for checking. I stayed up pretty late trying to figure it out as well. I even looked at the xfce4-panel source a bit, but no dice. Oh well.

    PS: I love the blog – I am new to xubuntu and am loving it so far, since my laptop is pretty old it feels like I just went out and bought a brand new pc. I have ram again 🙂

  7. hi, i have a problem with xfce panel color, even if i set black bg pixmap and bg[NORMAL] to “#000000” for it, the backround of tray icons on it remains the same color as is bg[NORMAL] of default style of current theme .. is there any chance to fix it?

  8. Cool tip, but a bit.. useless since EVERY panel gets these options, and every item on the panel (like the clock, the workspace etc.) also gets its own background making it quite.. ugly. Too bad.

  9. […] in the panel manager to set a background image for your panels! Luckily, that other Xubuntu Blog comes to the rescue. Basically, what we will do is to override the settings of whatever GTK theme you are using to […]

  10. […] in the panel manager to set a background image for your panels! Luckily, that other Xubuntu Blog comes to the rescue. Basically, what we will do is to override the settings of whatever GTK theme you are using to […]

  11. Quick question, somehow I lost my panel, now is only visible if I type xfce-panel, if I close the terminal is gone, how can I restore it so it loads at login. Thanks!

  12. Nevermind I just fixed it by running it with alt-f2. Thank you for this blog.

  13. OK, I tried the above technique but the panels are still the same. I went back in and tried to apply a background image, nothing. Then I went in and changed the colour values to black and still nothing. Any ideas??

  14. wrong syntax!!!
    i changed quates manualy from
    bg_pixmap[NORMAL] = backgroun…
    to
    bg_pixmap[NORMAL] = backgroun…
    everywhere and it solved error: unexpected character `\342′, expected string constant…

  15. ok forum automaticly changes quotes, so you have to retype tham all manualy again!

  16. Nag screen says “Cannot convert ISO-8559-something”

    Please tell me how 2 fix ?

    Also installed gmome-color-chooser from Synaptic.

    Works. I just want the horizontal gradient too.

    Steve

  17. its so difficult

  18. visit us!
    newsbox.cc
    newsbox.us
    nbstatus.wordpress.com
    NOW!


Leave a comment

Blog at WordPress.com.
Entries and comments feeds.