<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 19/09/2021 14:52, Michael Biebl
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAGWsdOgU43zho5wnF55Q35RRd3aS6_oGjbwZcFKDYjn0SP8dzQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">You don't hard-code it, you just use it?</pre>
</blockquote>
<br>
OK, yes, it is just used.<br>
<br>
<blockquote type="cite"
cite="mid:CAGWsdOgU43zho5wnF55Q35RRd3aS6_oGjbwZcFKDYjn0SP8dzQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">In your case, since you have a user service which appears bound to the
lifetime of a graphical (X/Wayland) session, I guess
graphical-session.target is what you want.
See man systemd.special.</pre>
</blockquote>
<br>
I should have specified. This is actually KDE. So, I'm using
plasma-core.target to ensure that either<br>
window system has started so a widget can be placed in the user's
taskbar.<br>
<br>
The issue is that the DISPLAY environment variable changes depending
on various things. So, I<br>
can't just use the value in Environment= as it may not match the
circumstance.<br>
<br>
I could not find when <span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;"></span>EnvironmentFile=
is read.<br>
<br>
Would using ExecStartPre= to run a script that creates the
EnvironmentFile work?<br>
<br>
<br>
<br>
</span>
<blockquote type="cite"
cite="mid:CAGWsdOgU43zho5wnF55Q35RRd3aS6_oGjbwZcFKDYjn0SP8dzQ@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">
So far, I think only GNOME implements graphical-session.target though.
Am So., 19. Sept. 2021 um 03:05 Uhr schrieb Ed Greshko <a class="moz-txt-link-rfc2396E" href="mailto:ed.greshko@greshko.com"><ed.greshko@greshko.com></a>:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
Not a everyday systemd service writer....
I've written a user service file to start an app on login. It works well for Xorg with Environment=DISPLAY=:0.
But I've found that under Wayland the DISPLAY=:1 after a logout of Xorg and login to a
Wayland session.
What would be the proper way to get the DISPLAY environment varible use it as opposed
to "hard" coding it?
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>