[systemd-devel] logind: support of shared devices

Oleg Samarin osamarin68 at gmail.com
Mon Jan 5 01:07:19 PST 2015


The default systemd behavior is to grant/revoke access on devices
attached to a seat when the user activates/deactivates a session on the

But sometimes it needs the user has an access to some device when he/she
activates a session with ANY seat. 

For example, I have two seats:
seat0 with ordinary monitor/keyboard/mouse/usb hub/usb sound card and
seat1 that is using as a music workstation: it has some midi keyboards
and sound cards connected. Usually I run midi applications on seat1, but
sometimes I run them on seat1. All midi applications require the access
to /dev/snd/seq kernel device. So it should be granted when a user
activates a session on any seat.

My approach to make this is to introduce a special UDEV tag 'shared'
that tells logind that this device is attached to all seats and logind
has to grant access to all sessions on all seats

I've made a patch to systemd/logind that processes the 'shared' tag.

After adding the simple udev rule:

KERNEL=="seq", SUBSYSTEM=="sound", TAG+="shared"

/dev/snd/seq becomes accessible from all seats.

Could you resolve this patch upstream or propose another way of granting
access to /dev/snd/seq on activating sessions?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-216-oleg-multiseat-shared.patch
Type: text/x-patch
Size: 6068 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150105/1344163f/attachment-0001.bin>

More information about the systemd-devel mailing list