[systemd-devel] Multi-session for seats other than seat0

David Herrmann dh.herrmann at googlemail.com
Sat Feb 16 11:27:08 PST 2013


As some might know I am working on several prototypes to allow
multi-session capable seats that do not have classic kernel-VTs.
Comments are very welcome, but in this discussion I want to
concentrate on how to integrate them with systemd-logind. The
different ideas are:

#1 Fake VTs via CUSE
I already have a working prototype for this which provides VTs for all
seats via /dev/ttyF<seatname>. It is implemented via CUSE in
user-space and nearly 100% backwards-compatible with kernel VTs. One
important difference is that only one VT-char-dev is available per
seat. Each open-file on it opens a different VT. This avoids having
multiple applications trying to open the same VT.

#2 DBus API
I haven't worked on this, yet, as I think we should avoid it. But for
completeness: One Bus-object for each seat that manages VTs similar to
kernel VTs. This can obviously only be used for dispatching between
VTs and doesn't provide any text-mode.

#3 System Compositor
An xserver or wayland-compositor that runs clients in full-screen mode
only. Switching between clients is done by the compositor and it
manages input/graphics device access. The clients of the compositor
would now replace VTs (logically equivalent). I have a somewhat
working prototype but this is what I am currently working on.

#4 Extending CONFIG_VT
We can make CONFIG_VT multi-seat aware. However, this _really_ breaks
text-mode as the kernel has no idea which devices belong to which
seat. There are other issues that I don't want to discuss now. But for
completeness, I list this here.

Comments on the ideas are welcome, but my question is not which one is
best or what the problems of each approach are. My question rather is
how to make systemd-logind aware of the multi-session capability of
other seats.

What information does logind need?
1. A way to detect whether a seat is multi-session capable or not.
Default is obviously "no".
2. Some way to be notified which session of a multi-session capable
seat is currently active.
3. Optionally some ID/string identifying each "VT"-object on a seat
that can be printed for sessions to see where it is active on.

How can logind get this information?
#1 Patch logind to detect all supported multi-session types (similar
to how it detects kernel VTs)
#2 Add a Bus-API to allow external multi-session providers to register
VTs with logind

Any comments? I'd really like to get a working prototype, but first
I'd like to know which of the two options is preferred? Patching
logind directly? Or adding a bus to allow any external multi-session
provider? Or has anyone a better idea?


More information about the systemd-devel mailing list