On Fri, 14 Nov 2025 11:07:26 +1030 Tim via users <[email protected]> wrote:
> On Thu, 2025-11-13 at 13:00 -0600, Ben wrote: >> Realized after posting this that I had a pretty simple workaround: >> just check if the wrapperscript is being called by gdm and exit: >> >> if [ "$(id -un)" = "gdm" ]; then >> echo "This command should not be run as the gdm user." >> exit 0 >> fi > What about don't run it for any users below UID 1000? That could catch > any corner cases. (Different login managers, etc.) Right. The ConditionUser systemd directive permits to do that with: ConditionUser=!@system in the [Unit] section. Ref: man systemd.unit Example: /usr/lib/systemd/user/grub-boot-success.timer > Most information about running systemd services after login do it by > running that service as part of that user's account (in a ~/.config/ > file for each user). So, not a global service. It may be global if installed under /etc/systemd/user, with systemctl --user --global enable UNIT Example: /etc/systemd/user/timers.target.wants/grub-boot-success.timer -- francis -- _______________________________________________ users mailing list -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected] Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
