I have just switched from Fluxbox to giving xmonad a go, and I am definitely liking it. However, the one thing I haven't managed to do is to change my desktop background.

I am using Ubuntu 8 (uh, can't remember the value after the point), and I installed xmonad through the package manager, and then ran xmonad from the list of environments available on the login screen.

I have tried setting it using gconftool as suggested on the Haskell wiki, but it doesn't seem to have any effect.

4 Answers 4


Regarding prior comment from grawity, the correct syntax is actually

xloadimage -onroot -fullscreen <path.to.image>

The advantages over xloadiamge on xpmroot are:

  • allows png images
  • on Ubuntu, has its own package, rather than bein contained in the larger fvwm package

(sorry if this would be better as a comment on previous answer: I can't add comments)

  • 4
    I'm new to Haskell and Xmonad, and not exactly sure how to use that command in my Xmonad config. How am I supposed to use xloadimage?
    – E-rich
    May 30, 2012 at 21:12
  • Ubuntu 12.04, didn't fill if the image aspect ratio wasn't the same as my monitor's.
    – cmc
    Feb 5, 2013 at 13:22
  • 1
    @E-rich, put it in your .xinitrc file, usually before a line alike exec /bin/xmonad.
    – JMCF125
    Jan 6, 2014 at 19:27

I had some trouble with xloadimage (didn't work at all) and xpmroot (only accepts xpms and gimp wrote a strange one that it barfed on), but feh --bg-fill worked wonderfully (thanks to some guys on the arch forum).


Does this command work: xpmroot ~/background.xpm &? Where background.xpm is the filename of the image you want to be your background.

  • 4
    Btw, I am not sure if that stays as your background after logging out. You might need to add that command to your ~/.xsessions or ~/.xinitrc
    – Alvin Row
    Nov 5, 2009 at 0:52
  • For image formats other than XPM, xloadimage -root $path
    – user1686
    Nov 5, 2009 at 15:47

I use feh for this:

feh --bg-fill ~/pictures/background

This lives in my ~/.xprofile and also produces a script ~/.fehbg which may be run to set the same background and configuration later. There are alternative arguments that may be used aside from --bg-fill, man feh elaborates.

Feh is widely available and may be installed from the default Ubuntu and Arch linux package repositories, and likely others.

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.