7

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.

λ Jonas Gorauskas
  • 3,550
  • 3
  • 20
  • 19
  • 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
  • This command works and tiles the BG: `urxvt -pixmap "/home/jonasg/Pictures/tiles/escheresque_ste.xpm;style=tiled"` – λ Jonas Gorauskas Mar 17 '14 at 10:11
  • 1
    Not sure `xrdb -merge` is what you want. According to the [man pages](http://www.x.org/archive/X11R7.5/doc/man/man1/xrdb.1.html), `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
  • @JonasGorauskas, do I understand correctly that you found an answer to your question? If so, feel free to post an answer to your question and accept it. This will make the status of your question much more clear and also more helpful to others. – Benjamin B. May 28 '15 at 10:01

1 Answers1

3

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.

λ Jonas Gorauskas
  • 3,550
  • 3
  • 20
  • 19
  • urxvt complains it does not know `pixmap` option, what version of urxvt did you use? – Natjo Jun 07 '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 08 '17 at 18:15