[systemd-devel] Xorg or Wayland Environment

Ed Greshko ed.greshko at greshko.com
Sun Sep 19 01:05:03 UTC 2021


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