The most popular way to set your background in i3 seems to be using feh, via something like:

exec_always feh --bg-fill /home/user/Pictures/wallpaper.jpg

in your ~/.config/i3/config file. Then, in ~/.Xresources you can configure URxvt to be transparent with something like:

URxvt.transparent:     true
URxvt.shading:         50
URxvt.blurRadius:      0
URxvt.background:      #d3d3d3
URxvt.foreground:      #1d1f21

And as you can see, those two things together work perfectly with feh on my home computer. Ignore the horrific color scheme for now.

enter image description here

Now, for various reasons I don't have access to feh due to limited yum repos at work. I can't download and compile it myself or anything like that either. As a substitute, I've been using ImageMagick and its display functionality to set my background with:

exec_always display -window root /home/user/Pictures/wallpaper.jpg

which by itself, does set the wallpaper and works with i3.

The problem is that when I do this, it seems like ImageMagick has just set an overlay rather than actually setting the root image and as a result URxvt just reads a default grey root image. Note that this is also my home computer, where feh works just fine so it is not a URxvt problem.

enter image description here

  1. Is there a different way to set my background using ImageMagick so that it actually sets the root wallpaper? This is the solution that I would prefer.
  2. Are there other pieces of software, or preferably commonly pre-installed tools, that can be used to set my wallpaper? Again, keep in mind that I don't have access to things like feh at work, and anything else I'd have to look and see. I've seen this post that mentions a few but haven't had time to check if they exist at work or not. 1. I also don't have access to things like compton, xcompmgr, etc. for true transparency.

Update: I have tried using xsetroot and converting my .jpg images to .bmp using ImageMagick's convert, but xsetroot only works with .xbm images which only support black and white. This won't work cause I'd like it to still be the same as the .jpg image shown.

1 Answer 1


Running ltrace on feh shows it seems to create a pixmap and use XSetWindowBackgroundPixmap to attach it to the root window (193 is 0xc1 the root window id):

XOpenDisplay(...) = 0x22a8a50
XCreatePixmap(0x22a8a50, 193, 1920, 1080)        = 0x3000001
XSetWindowBackgroundPixmap(0x22a8a50, 193, 0x3000001, ...) = 1

but more importantly it sets two properties on the root window:

XChangeProperty(0x22a8a50, 193, 312, 20)         = 1
XChangeProperty(0x22a8a50, 193, 807, 20)         = 1

which you can see with

$ xprop -root
  ESETROOT_PMAP_ID(PIXMAP): pixmap id # 0x3000001
  _XROOTPMAP_ID(PIXMAP): pixmap id # 0x3000001

A program like ImageMagick's display does not seem to update these properties when it changes the root background.

You can check after using feh that when you remove both of the above properties (with xprop -root -remove ...) programs like urxvt will no longer show a transparent background.

Although xprop has a -set option, I don't know how you can use it to set or change the pixmap id.

  • Wow, this is some good information. So the we have a Display pointer with the first Xlib call, and Pixmap with the second. Then these are both used to set the root window image. A personal program could perhaps be written to make the fourth and fifth Xlib calls, but that might be convoluted to do. What exactly is the xprop -root information telling me? And where is the best place to find out if this is possible with the xprop -set ... option?
    – ThoseKind
    May 5, 2019 at 18:59
  • Another weird thing that I experienced is that if I use feh to set the root window image and then use display afterwards, it still shows the one that was set by feh when using fake transparency in urxvt. Once I log out/in again however, this is all reset.
    – ThoseKind
    May 5, 2019 at 19:06
  • As you can see, my answer is not really an answer, but just provides some clues as to what is going on. I think that urxvt looks for the property _XROOTPMAP_ID on the root window to get the id of the background pixmap, then does its own transparency graphics operation. If you change the background with display, it sets a different pixmap on the root, but the property doesnt change and that old pixmap is still around, even though it is no longer attached to the root window. The sources to X11 will not help much.
    – meuh
    May 5, 2019 at 19:19

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.