My distro is RHEL 8.6. By default, all user's unit files are put in the /home/myuser/.config/systemd/user
directory, then systemctl --user daemon-reload
make them available. My question is how I change the directory to another one, says /opt/home/myuser/.config/systemd/user
.
I found this: Where do I put my systemd unit file? and this: custom location for systemd services, but whatever variables I set, XDG_CONFIG_HOME, XDG_DATA_DIRS.... nothing works. systemctl
still doesn't try to load unit file from my custom path.
Please help, thanks a lot.
RequiresMountsFor=/home/myuser
into/etc/systemd/system/user@.service.d/home.conf
, the system is screwed, systemd-logind jumped to 100% CPU, anything related to systemd stopped working. – Luke Huang Nov 15 '23 at 01:57user@.service
(assuming that manages the user session, I'll have to check)? – muru Nov 15 '23 at 02:18