Today I learned about `loginctl` which, as expected, controls Linux logins. It's not quite as well documented as I'd like, but after tinkering with it for a while I've done some very cool stuff.

I put two NVidia cards into a 2U server and used `loginctl` to associate each one with an automatic login session in lightdm (plus one non-autologin session with the built-in VGA hardware). So without creating an xorg.conf at all, this system runs an X session for each card plus Steam to stream games!

Follow

[email protected]:~$ loginctl list-seats
SEAT
seat0
seat1
seat23 seats listed.

[email protected]:~$ loginctl list-sessions
SESSION UID USER SEAT TTY
11 1000 fader pts/2
4 1000 fader pts/0
5 1000 fader pts/1
c1 124 lightdm seat0
c2 1000 fader seat1
c3 1001 xayide seat2 6 sessions listed.

[email protected]:~$ loginctl seat-status seat1
seat1
Sessions: *c2
Devices:
├─/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/drm/card1
│ [MASTER] drm:card1
├─/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/drm/renderD128
│ drm:renderD128
└─/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/sound/card0
sound:card0 "NVidia_1"
[...]

Show thread

Basically this makes an X or Wayland system into a multi-seat terminal server surprisingly easily. After having done this once, I think I could scale it out to a ton of seats really quickly.

Why anyone felt the need to *build* this after, say, 1985 or so is beyond me. But it is cool regardless!

Show thread
Sign in to participate in the conversation
Amaseto

A little group