You are not logged in.
I want to create a systemd service that runs this file: https://gitlab.com/XenHat/dotfiles/-/bl … pc_service
But the file will be placed somewhere in the user's home directory. So I have this so far:
[Unit]
Description=Discord Rich Presence Service for FFXIV
[Service]
ExecStart=
And don't know what the systemd is expecting to reference where the user's home directory is. is it $HOME like in bash? Or what? Also, once the file is written, should I put it in /etc/systemd and use systemctl enable like normal?
Last edited by coldreactive (2024-07-16 18:58:17)
Offline
You want this to be invoked as a user service and not a system service. https://wiki.archlinux.org/title/Systemd/User
As a user service you can use %h to refer to your home directory. in the unit file, so e.g.
[Unit]
Description=Discord Rich Presence Service for FFXIV
[Service]
Type=simple
ExecStart=%h/scripts/ffxiv_rpc
[Install]
WantedBy=default.target
Last edited by V1del (2024-07-16 17:01:28)
Offline
Thanks, so I just put that text into ~/.config/systemd/user/ffxiv_rpc.service?
Then run systemctl --user enable ffxiv_rpc?
Offline
Yes, I think so.
And as like system units you can inspect user units similar, if they are running ok, and what the log says:
systemctl --user status ffxiv_rpc.service
journalctl --user-unit ffxiv_rpc.service
Edit:
and for immediate start while your are in testing phase:
systemctl --user start ffxiv_rpc.service
Last edited by ua4000 (2024-07-16 18:56:22)
Offline