Ed Greshko wrote on 19/09/2021 12:11:
OK......
I think I see the problem now. I don't need Environment=. But the
issue is that, I assumed, "plasma-core.target" would be
reached only after a user logged in to plasma.
I was wrong and the user's service is run earlier when the login screen
appears.
I'm slightly confused by the logic here. Why is a user's systemd even
running before they've logged in? If the user has lingering enabled,
then it might have a systemd instance from that, but it certainly
shouldn't reach any plasma-core.target as the login GUI should be
running as a different user to your user I would have thought?
e.g. under gnome, the login GUI runs as the "gdm" user. That user has a
systemd --user instance, and runs various things but only once a real
user has logged in will it's own systemd instance start and reach the
appropriate targets.
I need to find a way such that the service only runs when a user logs on
to the plasma GUI.
It seems a bit odd to me that your users' plasma-core.target has been
run when your user hasn't even logged in yet. I think something is odd
there, possible combined with user lingering and perhaps plasma-core
being the default target for your user when it shouldn't be...
Hope this helps you debug things.
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited http://www.tribalogic.net/
Open Source:
Mageia Contributor http://www.mageia.org/
PulseAudio Hacker http://www.pulseaudio.org/
Trac Hacker http://trac.edgewall.org/