Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-01-08 12:53:13

ffcc
Member
Registered: 2021-10-14
Posts: 3
LinuxChrome 131.0

[SOLVED] Reload ~/.config/xfce4/desktop/icons.screen0.yaml

Hi,

I wrote a simple script to save/restore icon positions (they get all messed up when changing resolutions):

...
case "$1" in
    "save")
      mkdir -p ~/.config/xfce4/desktop.bak
      cp -vf ~/.config/xfce4/desktop/icons* ~/.config/xfce4/desktop.bak
    ;;
    "load")
      # check whether non-empty backup directory exists
      if [[ -d ~/.config/xfce4/desktop.bak ]] && [[ "$(ls -A ~/.config/xfce4/desktop.bak)" ]]
      then
        [[ $(cp -vf ~/.config/xfce4/desktop.bak/icons* ~/.config/xfce4/desktop) ]] && \
        echo "Backup directory '~/.config/xfce4/desktop.bak' restored." <& 2 && \
        echo "You must log out and log in again for changes to take effect." <& 2
      else
        echo "Backup directory '~/.config/xfce4/desktop.bak' not found or empty. Nothing was loaded." <& 2
      fi
    ;;
    "help"|"h")
      show_help
    ;;
esac

But I do not know how to force the session manager to re-read the yaml file containing the icon positions (~/.config/xfce4/desktop/icons.screen0.yaml).

I have to log out and log back in to force the file to be read.

Is it possible to do so without logging out?

Thanks

Last edited by ffcc (2025-01-09 13:11:43)

Offline

#2 2025-01-08 20:58:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Reload ~/.config/xfce4/desktop/icons.screen0.yaml

Hello and welcome.

Does reloading all the settings work?

xfdesktop -R

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-01-09 11:12:09

ffcc
Member
Registered: 2021-10-14
Posts: 3
LinuxChrome 131.0

Re: [SOLVED] Reload ~/.config/xfce4/desktop/icons.screen0.yaml

ToZ wrote:

Hello and welcome.

Does reloading all the settings work?

xfdesktop -R

No, it does not. I still need to log out and log back in to force the yaml to be read.

Offline

#4 2025-01-09 11:41:13

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,678
LinuxFirefox 133.0

Re: [SOLVED] Reload ~/.config/xfce4/desktop/icons.screen0.yaml

It might be a good idea to create a bug report since the "-R" parameter is supposed to re-read all the settings. In the meantime, to avoid having to logout and back in, you could run something like:

pgrep xfdesktop && (xfdesktop -Q; xfdesktop &) || xfdesktop &

...to restart the xfdesktop process.

One additional note: there is currently a bug, or rather an weak optimization in the code where the drawing of the desktop is slower in 4.20 than in previous versions. To bypass this, set Color to "Transparent" in the Desktop Settings > Background tab even if you are using an image. This will speed up the restart of the xfdesktop process. https://gitlab.xfce.org/xfce/xfdesktop/-/issues/347 if you're interested.


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-01-09 12:15:02

ffcc
Member
Registered: 2021-10-14
Posts: 3
LinuxChrome 131.0

Re: [SOLVED] Reload ~/.config/xfce4/desktop/icons.screen0.yaml

ToZ wrote:

It might be a good idea to create a bug report since the "-R" parameter is supposed to re-read all the settings. In the meantime, to avoid having to logout and back in, you could run something like:

pgrep xfdesktop && (xfdesktop -Q; xfdesktop &) || xfdesktop &

...to restart the xfdesktop process.

One additional note: there is currently a bug, or rather an weak optimization in the code where the drawing of the desktop is slower in 4.20 than in previous versions. To bypass this, set Color to "Transparent" in the Desktop Settings > Background tab even if you are using an image. This will speed up the restart of the xfdesktop process. https://gitlab.xfce.org/xfce/xfdesktop/-/issues/347 if you're interested.

Thank you so much. Restarting xfdesktop via command line works as a charm as it restarts right away in less than a second.

PS: I did not set the background color to "Transparent" to speed up the restart process. Doing so did not make a big difference.

I'll mark this as SOLVED.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 558.51 KiB (Peak: 559.35 KiB) ]