1

I don't run a desktop environment, but instead use a bare window manager (StumpWM). Thus, my usual method for setting a desktop background is to run display -window root <image file> from a WM startup script, which does what I want.

When using multiple monitors, the X root window stretches across both and includes dead space. Thus, running that command line causes the image to either be stretched or tiled across the entire window, which isn't useful. I can use -geometry to display an image on either monitor, but if I run that again (to view on both monitors) it overwrites the other. There doesn't seem to be any ability with display to display two images in one invocation.

How can I use display to display different images on both monitors? Alternatively, how else can I get the "desktop background image" effect without a desktop environment?

2

You could use montage to generate a single image that encompasses your whole display, and call display -window root on the resulting image.

Alternatively, you can use xloadimage which is happy to tile multiple images. It doesn't know about separate monitors, so if your images aren't full-screen or if you have different-size monitors, you may need to use -at or -geometry to adjust the image positions manually.

xloadimage -onroot -at 1680,0 image1.jpg -at 0,0 image2.png
  • xloadimage works perfectly. Thanks. – Tom Hunt Mar 14 '16 at 3:41

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.