How to set a background image for urxvt?

7,327

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.

Share:
7,327
misteraidan
Author by

misteraidan

"The lyf so short, the craft so long to lerne." - Chaucer Blog = The Standard Output Code = Github

Updated on September 18, 2022

Comments

  • misteraidan
    misteraidan almost 2 years

    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.

    • Jenny D
      Jenny D over 10 years
      Is urxvt compiled with support for background images? You can test this by running urxvt -pixmap /home/jgg/Pictures/tiles/escheresque_ste.xpm.
    • misteraidan
      misteraidan over 10 years
      @JennyD: yes, it is... running your suggested command works, but it does not tile the image.
    • misteraidan
      misteraidan over 10 years
      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.
    • misteraidan
      misteraidan over 10 years
      This command works and tiles the BG: urxvt -pixmap "/home/jonasg/Pictures/tiles/escheresque_ste.xpm;style=tiled‌​"
    • Hari Seldon
      Hari Seldon over 10 years
      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.
    • Benjamin B.
      Benjamin B. about 9 years
      @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.
  • Natjo
    Natjo about 7 years
    urxvt complains it does not know pixmap option, what version of urxvt did you use?
  • misteraidan
    misteraidan about 7 years
    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.