Hello, AttachDevice() isn't for the display manager to call. It's for the system administrator, either via the `loginctl` command, or a theoretical GUI to configure these settings. I don't know of any such GUI, but logind was designed to accommodate one
Best, Adrian On Sun, Mar 1, 2026, 08:24 Andrei Borzenkov <[email protected]> wrote: > 28.02.2026 10:28, Adrian Vovk wrote: > > > > I don't think the DM has the ability to create a seat. > > Quoting > > https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.login1.html > > --><-- > AttachDevice() may be used to assign a specific device to a specific > seat. The device is identified by its /sys/ path and must be eligible > for seat assignments. AttachDevice() takes three arguments: the seat id, > the sysfs path, and a boolean for controlling polkit interactivity (see > below). Device assignments are persistently stored on disk. To create a > new seat, simply specify a previously unused seat id. For more > information about the seat assignment logic see sd-login(3). > --><-- > > Notice "to create a new seat". > > Hmm ... the description of ID_FOR_SEAT in the > > https://www.freedesktop.org/software/systemd/man/latest/sd-login.html#Property%20ID_FOR_SEAT > is wrong. It suggests that ID_FOR_SEAT is used to name new seat: > > --><-- > When creating additional (manual) seats starting from a graphics device > this is a good choice to name the seat after. It is created from the > path of the device. This is useful in UIs for configuring seats: as soon > as you create a new seat from a graphics device, read this property and > prefix it with "seat-" and use it as name for the seat. > --><-- > > In reality ID_FOR_SEAT is used as the unique device property to match > when assigning thos device to the seat. The only place where ID_FOR_SEAT > is used is in the AttachDevice method where seat name is always defined. > > "TAG==\"seat\", ENV{ID_FOR_SEAT}==\"%s\", ENV{ID_SEAT}=\"%s\"", > id_for_seat, seat); > > For all I can tell, ID_FOR_SEAT was never used in the way the man page > describes. >
