[Unit] Description=Sunshine Gamestream Server for Moonlight [Service] WorkingDirectory=/home/%u Environment="DISPLAY=:0" Type=simple # wait for Xorg ExecStartPre=/bin/sh -c 'while ! pgrep Xorg; do sleep 2; done' ExecStart=@SUNSHINE_EXECUTABLE_PATH@ [Install] WantedBy=default.target