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.)

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.

Some of the comments in here *may* be useful:

https://unix.stackexchange.com/questions/397853/how-to-set-a-systemd-unit-to-start-after-loading-the-desktop

-- 
 
uname -rsvp
Linux 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
(yes, this is the output from uname for this PC when I posted)
 
Boilerplate:  All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
 

-- 
_______________________________________________
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

Reply via email to