6

How do I set a tiled background image in urxvt? I have tried the following alternatives in my .Xresources file:

URxvt*backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.png;style=tiled

URxvt.backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.xpm

URxvt.backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.png;+0+0:tile -tr

I also ran xrdb -merge ~/.Xresources to ensure that the configuration is updated every time.

What am I missing? Is there a library I need to install?

I'm running rxvt-unicode (urxvt) v9.15 on a Debian 7.4 (Wheezy) system.

  • 1
    Is urxvt compiled with support for background images? You can test this by running urxvt -pixmap /home/jgg/Pictures/tiles/escheresque_ste.xpm. – Jenny D Mar 17 '14 at 10:01
  • @JennyD: yes, it is... running your suggested command works, but it does not tile the image. – λ Jonas Gorauskas Mar 17 '14 at 10:04
  • 1
    Ah, so you're getting the picture but not getting it tiled? I misunderstood, then. You may need to escape the ;with a backslash in your resource. – Jenny D Mar 17 '14 at 10:08
  • On the command line by using the suggested command you mentioned above, yes, I was able to load the BG image. I am NOT able to load the image via the reference in the .Xresources file. – λ Jonas Gorauskas Mar 17 '14 at 10:11
  • 1
    Not sure xrdb -merge is what you want. According to the man pages, xrdb -merge actually merges the resource file into the running configuration and then sorts it. Maybe try xrdb -load to reset the actual running configuration. – Hari Seldon Mar 17 '14 at 13:00
2

Use the -pixmap option to set the background image for RXVT. For instance, I have a set of small .png tiles that I pick at random using the following one-liner:

urxvt -pixmap "`find /path/to/tiles/ -name '*.png' | sort -R | head -n 1`;style=tiled"

You could easily turn the above into an alias or script.

  • urxvt complains it does not know pixmap option, what version of urxvt did you use? – Jonas Jun 7 '17 at 12:06
  • I am using version 9.22 ... You need to get a version of rxvt-unicode which had the pixbuf option turned on during compilation. For example, in Arch Linux you can install the rxvt-unicode-pixbuf package from the AUR. – λ Jonas Gorauskas Jun 8 '17 at 18:15

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.