Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-10-17 16:16:00

N00body
Member
Registered: 2021-11-23
Posts: 31

[SOLVED] Change background to all monitors by one xfconf command

Currently I know that the change of background by CLI by command "xconf-query" requires to know the monitor name and the number of screens.

An example command could be:

xfconf-query -c xfce4-desktop -p "/backdrop/screen$N/$monitor_name/workspace$M/last-image" -s "$background_theme"

If I am in the case where I don't know prior the monitor name, the number of screens and the number of workspaces, is there a command that apply the same background to all monitors, screens and workspaces?

Last edited by N00body (2023-10-17 18:19:14)

Offline

#2 2023-10-17 16:44:35

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,091

Re: [SOLVED] Change background to all monitors by one xfconf command

Not in the sense that there is one command that will apply to all, however, you could script something to pull put all "last-image" settings and set them to a new image. For example:

NEW_IMAGE="/usr/share/backgrounds/newimage.jpg"; for x in $(xfconf-query -c xfce4-desktop -lv | grep last-image | awk '{print $1}'); do xfconf-query -c xfce4-desktop -p $x -s $NEW_IMAGE; done

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-10-17 18:19:34

N00body
Member
Registered: 2021-11-23
Posts: 31

Re: [SOLVED] Change background to all monitors by one xfconf command

It works. ^^ Thank you

Offline

Board footer

Powered by FluxBB