2

On Linux with systemd it is possible to have multi-sessions on one seat, eg. I have reached the graphical target starting my display manager, login, and then my graphical user session is in place. I can additionally login via ssh or similar – as far as I understood, this is another session.

However, I'd like to have another such graphical session (preferredly via another DM instance) "in background" (from a different TTY and I can perhaps vtswitch to it) that also uses a different configuration (specifically, auto-login to another user). So when I start my computer (eg. via WOL), I'm greeted with a DM to login, and another user is automatically logged in in the background spawning X with a preconfigured setup.

Rationale: This other user should also launch Steam to be available for In-Home Streaming in the network. I'd like to even extend this to have more than just one instance of Steam In-Home Streaming hosts running, with different accounts to be available, but AFAIK Steam doesn't support this use-case.

However, after reading up on the systemd terminology of sessions and seats and display managers, I've no idea whether this is even possible. A workaround idea was to use systemd services, possibly lingering, to start X under a different user from in the background but this didn't lead anywhere. I'm not quite sure which approach to follow or whether any of this could work, if someone with a deeper understanding of sessions could chime in and give their advice, that'd be really great!

Another idea I've been playing around with in my head is to only have one graphical session, but use something like cage, a Wayland kiosk, to spawn a hidden "full-screen" Steam instance that's available to stream from.

ljrk
  • 2,009
  • 1
  • 14
  • 17
  • @CliffArmstrong Hm, I don't think I understand you there. When I'd start X, I start it "from" a TTY, surely it would basically "override" the TTY and not use it. But you cannot (AFAIK) start another X within X, but you can start different X instances "on different TTYs" for a lack of a better term? – ljrk Apr 06 '20 at 10:12
  • @CliffArmstrong Ah, I understand the terminology and the problem (eg. multi-seat vs. multi-session) way better now, I will edit the question to improve that. This does sound like using something like cage+Xwayland is indeed a possibly better way to go (although likely with a higher latency) – ljrk Apr 06 '20 at 10:41
  • @CliffArmstrong Thanks for the really insightful comments! I've another question regarding the terminology, though: why do display-managers need to know "on" which TTY they spawn or their occupy? Would a better terminology be perhaps "Framebuffer" in this context? – ljrk Apr 06 '20 at 10:48
  • 1
    Ugh, it may actually be me that's getting the terminology wrong. I'm too used to thinking of virtual consoles and ttys as the same thing. TTYs are spawned by the kernel. During start up, a certain number of these TTYs are used for the creation of virtual consoles which are typically then used to display text-based login prompts. Desktop systems also typically spawn an xwindows process which does in fact exist _on_ a tty (TTY7, usually). You can switch between TTYs by pressing CTRL+ALT+F#. Apologies for the confusion. – Cliff Armstrong Apr 06 '20 at 11:20
  • @CliffArmstrong No problem, the terminology is definitely weird. To me TTY (Tele Typewriter) or Terminal seems to be more of an umbrella term, encompassing physical TTYs, virtual terminals and pseudo terminals used within eg. Terminal Emulators. I definitely need to dig in deeper into the terminology here regardless of the problem. But understanding that X exclusively tries to take control of the framebuffer does help with understanding in what direction I need yo go, thank you! – ljrk Apr 06 '20 at 11:35

0 Answers0