setting background image by shell command?

houghi houghi at houghi.org
Wed May 1 04:03:29 CEST 2013


On Tue, Apr 30, 2013 at 06:41:53PM +0200, Ulli Horlacher wrote:
> On Tue 2013-04-30 (18:17), Ulli Horlacher wrote:
> > Is it possible to change the background image by a shell command?
> 
> Found it by myself:
> 
> xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s $IMAGE

Just for information, if you have more then one screen, the second screen,
just change screen0 to screen1. I go till screen3.

Question: I know how many screens I have, but how could I find this out
with a bash script? I do not mean running `echo $DISPLAY` on each and then
looking what the highest number is. I mean that I should get an output of
4 (or 3 if it starts counting from 0) with my 4 screens and if I have 2 on
another system, I get the answer 2 with the same script/command.

houghi
-- 
If you owe the bank $100 that's your problem. 
If you owe the bank $100 million, that's the bank's problem.
If you owe the bank $700 billion, it becomes your problem again.


More information about the Xfce mailing list