Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-08-12 09:01:44

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Debian Trixie - Desktop does not change from terminal

Hello all,

I have installed XFCE4 with no problems for all of Bookworm. However recently when I set the desktop from the xfconf-query utility it does not change.
It stays on the default XFCE4 desktop image, even when restarting. However when I launch the desktop settings the image is nowhere to be found.

How can I make it reliably change? It did so on Bookworm.

Kind regards.

Offline

#2 2025-08-12 10:19:37

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,123
LinuxFirefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

What version of Xfce are you running? Is it on X11 or Wayland?

Run the following command in a terminal window:

xfconf-query -c xfce4-desktop -mv

...and then change the wallpaper using the gui settings dialog. What will get displayed in the terminal window is the property that you need to set using xfconf-query.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-08-12 16:00:19

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

ToZ wrote:

What version of Xfce are you running? Is it on X11 or Wayland?

Run the following command in a terminal window:

xfconf-query -c xfce4-desktop -mv

...and then change the wallpaper using the gui settings dialog. What will get displayed in the terminal window is the property that you need to set using xfconf-query.

Hi ToZ, its on the new released (for Debian Trixie) 4.20. All the mechanisms worked on 4.18 (bookworm) And its x11

Here is a list of all the things I do:

echo "Applying panel profile if possible..."
if [[ -f /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml && $(grep -q '<channel name="xfce4-panel" version="1.0" locked="*" unlocked="root">' /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml) ]]; then
    echo "Panel is locked, cannot modify."
else
    xfce4-panel-profiles load /opt/ntos/panel-profile.tar.bz2
fi

# Set theme to Adwaita-Dark.
xfconf-query -c xsettings -p '/Net/ThemeName' -s 'Adwaita-dark'
xfconf-query -c xsettings -p '/Net/IconThemeName' -s 'Adwaita'
xfconf-query -c xsettings -p '/Gtk/CursorThemeName' -s 'Adwaita'

# Customize logout screen.
xfconf-query -c xfce4-session -np '/shutdown/ShowHibernate' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowSuspend' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowHybridSleep' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/ShowSwitchUser' -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np '/shutdown/LockScreen' -t 'bool' -s 'false'

# Limit workspaces (Like Virtual Desktops in Windows).
xfconf-query -c xfwm4 -p /general/workspace_count -s 1

# Desktop itself customization.
xfconf-query -c xfce4-desktop -np '/desktop-icons/style' -t 'int' -s '0'
xfconf-query -c xfce4-desktop -np '/desktop-menu/show' -t 'bool' -s 'false'
xfconf-query -c xfce4-desktop -np '/windowlist-menu/show-add-remove-workspaces' -t 'bool' -s 'false'

# XFCE4 Session settings.
xfconf-query -c xfce4-session -np /general/PromptOnLogout -t 'bool' -s 'false'
xfconf-query -c xfce4-session -np /general/SaveOnExit -t 'bool' -s 'false'

# Disable logout on screenlock and such things. (Unneeded without light-locker)
xfconf-query -c xfce4-power-manager -np '/xfce4-power-manager/lock-screen-suspend-hibernate' -t 'bool' -s 'false'
xfconf-query -c xfce4-power-manager -np '/xfce4-power-manager/logind-handle-lid-switch' -t 'bool' -s 'false'

# Configure the span monitor option.
xfconf-query -c xfce4-panel -np '/panels/panel-1/span-monitors' -t 'bool' -s 'true'

# Enable automounting
xfconf-query -c thunar-volman -np '/automount-drives/enabled' -t 'bool' -s 'true'
xfconf-query -c thunar-volman -np '/automount-media/enabled' -t 'bool' -s 'true'

# Set default action for Displays.
xfconf-query -c displays -np '/Notify' -t 'int' -s '3'

# Set a nice looking background.
for x in $(xfconf-query -c xfce4-desktop -lv | grep last-image | awk '{print $1}')
do
    xfconf-query -c xfce4-desktop -p "$x" -s "/opt/ntos/desktop.png"
done

Offline

#4 2025-08-12 16:22:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,123
LinuxFirefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

4.20 changed background handling (to accommodate wayland).

Post back the output of:

xfconf-query -c xfce4-desktop -lv

...to make sure that the correct property is there (which you can get from running the command in my previous post).


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-08-13 08:04:07

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

user@NTOS-PROXM-02:~$ xfconf-query -c xfce4-desktop -lv
/backdrop/screen0/monitor0/brightness         0
/backdrop/screen0/monitor0/color1             [7936,16128,28416,65535]
/backdrop/screen0/monitor0/color2             [26880,34048,46848,65535]
/backdrop/screen0/monitor0/color-style        1
/backdrop/screen0/monitor0/image-path         /opt/ntos/desktop.png
/backdrop/screen0/monitor0/image-show         true
/backdrop/screen0/monitor0/last-image         /opt/ntos/desktop.png
/backdrop/screen0/monitor0/last-single-image  /usr/share/images/desktop-base/default
/backdrop/screen0/monitor1/brightness         0
/backdrop/screen0/monitor1/color1             [7936,16128,28416,65535]
/backdrop/screen0/monitor1/color2             [26880,34048,46848,65535]
/backdrop/screen0/monitor1/color-style        1
/backdrop/screen0/monitor1/image-path         /opt/ntos/desktop.png
/backdrop/screen0/monitor1/image-show         true
/backdrop/screen0/monitor1/last-image         /opt/ntos/desktop.png
/backdrop/screen0/monitor1/last-single-image  /usr/share/images/desktop-base/default
/desktop-icons/style                          0
/desktop-menu/show                            false
/last-settings-migration-version              1
/windowlist-menu/show-add-remove-workspaces   false

These are the properties, I've replaced /usr/share/images/desktop-base/default with my own PNG image (which is the same as /opt/ntos/desktop.png)
Through this code:

cp /opt/ntos/desktop.png /usr/share/images/desktop-base/default

And

# Set a nice looking background.
for x in $(xfconf-query -c xfce4-desktop -lv | grep last-image | awk '{print $1}')
do
    xfconf-query -c xfce4-desktop -p "$x" -s "/opt/ntos/desktop.png"
done

Added later 1 h 51 min 51 s:
Expanding on this, the monitor command does this:

user@Unconfigured-NTOS:/opt/ntos$ for x in $(xfconf-query -c xfce4-desktop -lv | grep last-image | awk '{print $1}'); do     xfconf-query -c xfce4-desktop -p "$x" -s "/usr/share/images/desktop-base/default"; do
ne
set: /backdrop/screen0/monitor0/last-image (/usr/share/images/desktop-base/default)
set: /backdrop/screen0/monitor1/last-image (/usr/share/images/desktop-base/default)
user@Unconfigured-NTOS:/opt/ntos$ for x in $(xfconf-query -c xfce4-desktop -lv | grep last-image | awk '{print $1}'); do     xfconf-query -c xfce4-desktop -p "$x" -s "/opt/ntos/desktop.png"; done
set: /backdrop/screen0/monitor0/last-image (/opt/ntos/desktop.png)
set: /backdrop/screen0/monitor1/last-image (/opt/ntos/desktop.png)

However with no visual change of background.

Added later 5 h 31 min 28 s:
Aha! It uses new properties!

xfconf-query -c xfce4-desktop -np '/backdrop/screen0/monitorVirtual-1/workspace0/last-image' -t 'string' -s '/opt/ntos/desktop.png'

Offline

#6 2025-08-20 10:31:46

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

ToZ wrote:

4.20 changed background handling (to accommodate wayland).

Post back the output of:

xfconf-query -c xfce4-desktop -lv

...to make sure that the correct property is there (which you can get from running the command in my previous post).

Hello @Toz,

Is there a general one-size-fits-all to cover all possible combinations?

/backdrop/screen0/monitorDP-1/workspace0/last-image
xfconf-query -c xfce4-desktop -np '/backdrop/screen0/monitorVirtual-1/workspace0/last-image' -t 'string' -s '/opt/ntos/desktop.png'

Virtual DP, what more combinations are there?

Thanks.

Offline

#7 2025-08-20 21:50:59

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,123
LinuxFirefox 142.0

Re: Debian Trixie - Desktop does not change from terminal

All the combinations that are supported by X (also reported by xrandr). You cant get a list of active connected ones on any system with the following command?

xrandr | grep -i " connected" | awk '{print $1}'

Also keep in mind that "workspaceX" might contain multiple numerical values if you have different backgrounds for different workspaces.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2025-08-21 13:53:56

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

ToZ wrote:

All the combinations that are supported by X (also reported by xrandr). You cant get a list of active connected ones on any system with the following command?

xrandr | grep -i " connected" | awk '{print $1}'

Also keep in mind that "workspaceX" might contain multiple numerical values if you have different backgrounds for different workspaces.

That is a great suggestion! It does show the methods which XFCE uses.
Would there be a way to "blanket bomb/cover" all the possibilities?

Right now I still do something like:

for m in {1..10}; do
    xfconf-query -c xfce4-desktop -np "/backdrop/screen0/monitorDisplayPort-${m}/workspace0/last-image" -t 'string' -s '/opt/ntos/desktop.png'
    xfconf-query -c xfce4-desktop -np "/backdrop/screen0/monitorVirtual-${m}/workspace0/last-image" -t 'string' -s '/opt/ntos/desktop.png'
    xfconf-query -c xfce4-desktop -np "/backdrop/screen0/monitorDP-${m}/workspace0/last-image" -t 'string' -s '/opt/ntos/desktop.png'
done
xfconf-query -c xfce4-desktop -np '/backdrop/single-workspace-mode' -t 'bool' -s 'true'

Because if a user decides to add another monitor whatever way, I want it to be that background.

Offline

#9 2025-08-21 18:51:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,123
LinuxFirefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

It might be best to create a script that runs at startup, gets the names of the current displays and creates those properties. That way if something changes and a new name appears, it will create a property for it.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#10 2025-08-21 18:58:30

dselen
Member
Registered: 2025-01-06
Posts: 20
Windows 10Firefox 141.0

Re: Debian Trixie - Desktop does not change from terminal

ToZ wrote:

It might be best to create a script that runs at startup, gets the names of the current displays and creates those properties. That way if something changes and a new name appears, it will create a property for it.

Sounds reasonable.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 8 queries executed - Memory usage: 617.68 KiB (Peak: 634.52 KiB) ]