Bug 102307

Summary: Weston fails to run on seat1, because it needs a TTY. Only seat0 has TTYs
Product: Wayland Reporter: n3rdopolis <bluescreen_avenger>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description n3rdopolis 2017-08-19 03:25:40 UTC
Hi

I am trying to start weston on a second XDG_SEAT
Unless if I am missing something, or there is a way to emulate a full TTY (not just a PTY) Only seat0 allows TTYs

In my testing, I start bash on seat1 with
systemd-run --setenv=XDG_SEAT=seat1 -p PAMName=login -p User=username -t bash

and then try to start Weston
weston --seat=seat1

I get "logind: session not running on a VT"
I even try to specify --tty=/dev/ttyX , and get the same error.

I tried to use the weston-launch, and weston-launch then wants to run on a VT as well...

Am I missing something? I don't know if it is possible to associate TTYs with seats other than seat0 based on some things I read...

Thanks
Comment 1 Daniel Stone 2017-08-21 12:07:46 UTC
I believe you need to associate your login session with that seat; every session is created on a particular seat.
Comment 2 n3rdopolis 2017-08-21 12:54:43 UTC
Hi. It is associated with the seat, sorry I wasn't clear, I discovered that I can set the logind seat to seat1 with systemd-run by specifying --setenv=XDG_SEAT=seat1 ...
...when I run loginctl, it appears as seat1
Comment 3 Pekka Paalanen 2017-08-22 07:43:56 UTC
I wonder, perhaps ideally the choice of the KMS device(s) should dictate if a TTY is needed or not. If the KMS device is used for TTYs, then we need to tell the TTY to back off properly, but if it is not, then I suppose we should not care about the TTY.

I suppose the seat assignments via udev should be good for that?

Oh... the same goes for the input devices.

And if there is no TTY, weston should disable the VT-switching key bindings.

Maybe all that could also allow running Weston on kernels with CONFIG_VT=n.

Or, does Weston just have superfluous TTY/VT checks when it's using logind, and otherwise everything would just work?
Comment 4 n3rdopolis 2017-08-22 11:15:39 UTC
For the second question
I could try to disable the checks... ...but I might have to do some grepping to find out how to do that... 
I am willing to test a temporary patch...
Comment 5 n3rdopolis 2017-08-28 02:15:49 UTC
I made https://lists.freedesktop.org/archives/wayland-devel/2017-August/034860.html
It seems to work
Comment 6 Daniel Stone 2018-06-04 07:13:24 UTC
Closing this bug so we can discuss patches on the list instead.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.