A way to launch Weston via remote with logind
Launching Weston/DRM via ssh or a serial terminal is currently a pain. One way is to be root and issue weston --tty 2
while TTY 2 is active, but this will use launcher-direct and everything will run as root, so it's bad.
Not sure if weston-launch
is any better, it would not use logind integration either.
I believe there should be a way to launch Weston via remote such that it would work as if launched manually as weston
from the local console, relying on logind. It should be easy to use and clearly documented.
I'm not sure how that should be implemented. Should weston-launch
, being setuid-root, be extended to do all necessary setup, hijack a VT, and pretend towards logind that Weston is started from the local console? Or should we just finish the systemd service file for running Weston as a normal user? I suppose the actions under the hood would be practically the same, it's just systemd vs. a hand-written tool for the same. Or should it be shell-scripted with openvt
et al.?
Logind will normally refuse to give session control because launched via ssh there is no seat. Also Weston may want to inspect the current tty, and there is none or not a local one via ssh (or serial?).