[systemd-devel] Xorg or Wayland Environment
Michael Biebl
mbiebl at gmail.com
Sun Sep 19 06:52:02 UTC 2021
You don't hard-code it, you just use it?
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.
So far, I think only GNOME implements graphical-session.target though.
Am So., 19. Sept. 2021 um 03:05 Uhr schrieb Ed Greshko <ed.greshko at greshko.com>:
>
> 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?
More information about the systemd-devel
mailing list