Hey all,
I'm trying to execute a user systemd function from /etc/rc.local: 755, root.root.
My thought is to use su. Is there a better way?
This is where I'm at now.
su --login mike --command=systemctl --user start <some service>
Anybody know how to accomplish this? I personally know about 100 ways to do it wrong ;D
TIA Mike Wright
Hi Mike have you tried to use systemctl's own pöossibilities using a xxxx.service file?
e.g.
[Unit] Description=thunderbird
[Service] Environment=DISPLAY=:0.0 Environment=LC_TIME=en_DK.utf-8 ExecStart=/usr/bin/thunderbird User=cvs
[Install] WantedBy=graphical.target
This service file makes thunderbird run under userid cvs. When you run such a script it will require authentication to run under a different user.
suomi
On 29/04/2022 00.02, Mike Wright wrote:
Hey all,
I'm trying to execute a user systemd function from /etc/rc.local: 755, root.root.
My thought is to use su. Is there a better way?
This is where I'm at now.
su --login mike --command=systemctl --user start <some service>
Anybody know how to accomplish this? I personally know about 100 ways to do it wrong ;D
TIA Mike Wright _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
users@lists.stg.fedoraproject.org