Correct way to restart or HUP thunar to recognize change in uca.xml and still be child of xfce4-session

I was comparing two Manjaro XFCE systems and noticed one was running a Thunar daemon.

It looks like one system might have xfce4-session.xml from /etc/xdg/ and the other from /etc/skel, but I don’t know why.

xfce4-session.xml in /etc/xdg starts a Thunar --daemon.

Which way is the intended Manjaro way and when does one directory get picked over the other?

If I do the following:

pacman -Fx /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

I see the file is on the community repo and part of the manjaro-xfce-settings package.

Why can’t I see the file at Manjaro Gitlab at gitlab.manjaro.org/packages/community/xfce/manjaro-xfce-settings?

Because you look in the wrong place. :wink:
In that gitlab repo is the PKGBUILD
which contains the URL of where the package comes from:

Profiles & Settings / manjaro-xfce-settings · GitLab
https://gitlab.manjaro.org/profiles-and-settings/manjaro-xfce-settings

editing and extending your original post instead of creating another is hard to follow by anyone else but me - and even I was a bit puzzled …

My response is:
I don’t know.

My question to you would be:
What is the context of this?

There may be a much better way to achieve whatever you want to achieve.

Sorry. Okay.

Update:
Thank you @Nachlese. I totally missed that.

I should have looked at a combination of a systemd service file for thunar and how Xfconf works. If I go to Settings Manager > Settings Editor > xfce4-session, those key-value pairs seem to come from a merge of the files mentioned above (~/.config/xfce, /etc/xdg, /etc/skel/.config/xfce4). The doc is sparse.

Questions

  1. What is the correct way to get Thunar to recognize a change to its’ uca.xml file?

    After a killall -HUP Thunar, Thunar is a child of systemd rather than xfce4-session. If I restart Thunar from the command line with Thunar --daemon &, Thunar is a child of the terminal. When I closed the terminal, Thunar became a child of systemd again. How do I get Thunar started as a daemon under xfce4-session again, which is where it is when I log on? DBus??

  2. How does Thunar get started on log on? I see the /usr/lib/systemd/usr/thunar.service file, but in the flow of things, how does it work?

Commands Used
pgrep -ai thunar
pstree -ap | less
journalctl -g thunar
systemctl status --user thunar.service
xfce4-settings-editor
xfconf-query --channel xfce4-session --property /sessions/Failsafe/Client3_Command --type string --set Thunar --type string --set '--daemon' --force-array
find ~ -newermt '1 minute ago'

I’m not quite sure if I understand what you want to know.
anyway
The files in /etc/skel are used to populate a new user account with default values upon creation of the account.
They are not used for anything else or read by anything else - but just for being copied to a new user account upon creation, to provide default, pre-configured values.

Files in /etc are only used if there is no corresponding file in the users home directory.
user config overrides these

not sure if that helps - hope so

I made a change to $HOME/.config/Thunar/uca.xml (custom action). Historically, I would send a HUP signal and be done with it. I was discussing this with an associate and they said Thunar is running as a daemon, but on my machine it wasn’t.

First I compared configuration files. When I went into the GUI Settings Editor > xfce4-session >sessions >Failsafe, I saw “Thunar”, “–daemon”. I discovered the values come from both $HOME/.config/xfce4 and /etc/xdg/xfce4.

I realized it was the HUP.

When a user logs onto XFCE and does a pstree -ap |less -p thunar, Thunar will be a process under xfce4-session.

pgrep -ai thunar will show for example “695 Thunar --daemon”. If you kill -HUP 695, the daemon is gone.

Do I need to tell xfce4-session or systemd to restart the Thunar daemon?

Who initially starts the Thunar daemon when a user logs on?

This helps. I now know where the config files exist and how they are merged. And a lot more about Xfconf. :slight_smile:

But then…