You are not logged in.

#1 2021-10-12 10:44:08

Med
Member
Registered: 2011-08-08
Posts: 16

[SOLVED] GNOME assigns drives to the wrong seat

I have two seats on my computer, seat0 and seat1. Each one has a graphics card and half of the USB ports assigned to it. Everything works fine except when plugging a storage device (USB key, cell phone, hard drive). If the person on seat1 plugs something on their USB port, the device will be assigned/automounted to the user of seat0. Besides the obvious security/privacy implications of exposing files to another user, this is highly annoying as the user of seat1 cannot access their files. Everything happens as if GNOME was not seat-aware. I looked at udisks2/polkit but it is not obvious to me what piece of software is guilty here. Any help to address this issue would be highly appreciated. Thanks!

Last edited by Med (2021-10-16 16:38:04)

Offline

#2 2021-10-15 23:20:37

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: [SOLVED] GNOME assigns drives to the wrong seat

I have a similar config. At the moment, I run LightDM with Cinnamon on seat0 and Gnome on seat1. For me, things are working normally. I (seat0) am offered to mount a usb which is plugged into seat1, and the authentication pop up says the action is: org.freedesktop.udisk2.filesystem-mount-other-seat
I can make some more tests when the misses is not busy with youtube. Can you mention the DE you use for each seat (I guess Gnome on both seats) and the display manager you use?
For reference I dont use automount on either seat, but I will at least experiment to see if I can duplicate your scenario (although most recently, GDM was not working to launch two greeters, hence I went back to LightDM ("old reliable" in my multiseat setup)

Offline

#3 2021-10-16 11:36:12

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: [SOLVED] GNOME assigns drives to the wrong seat

I was able to test. I enabled automount on both seats. When a usb is plugged into seat1, seat0 tries to mount it (not seat1), however an authentication popup is shown. In other words, seat0 cannot mount the usb drive at seat1 automatically because he is not authorized. A system update solved the inability to get a greeter on seat1 with GDM. I tried different combinations of display manager and desktop environments. In my case, basically everything worked acceptably [for me] except maybe that seat0 was first choice to automount a disk at seat1. In my case, automounting disks would be annoying because seat0 "claims" it first, but no privacy risks unless seat0 types his sudo password.

Crazy idea, just throwing it out there. Can you ensure a mouse for example is assigned to seat1 when you use the same hole that you use for the usb drive? In my case, seat1 has one usb hole in the computer and that hole is connected to a hub (built into the monitor). All of seat1's devices are connected to the hub in the monitor (usb sound card, mouse, keyboard, usb disks when needed, etc...)

For me, I dont use automount. I never liked it anyway.

Offline

#4 2021-10-16 14:31:29

Med
Member
Registered: 2011-08-08
Posts: 16

Re: [SOLVED] GNOME assigns drives to the wrong seat

Thanks a lot for the tests. I have disabled automount on my seat (toggled /org/gnome/desktop/media/handling/automount and /org/gnome/desktop/media/handling/automount-open in dconf). Now when an external hard drive is plugged on a port assigned to seat1, it asks for *my* password even though someone else is logged into seat1. If a phone is plugged on an USB port assigned to seat1, no password is requested but when trying to access the files it complains (“unable to open MTP device”) when trying to open on seat1 but I can access the files just fine. It completely baffles me that anything at all is shown on seats that do not have access to a certain USB port.

Offline

#5 2021-10-16 16:37:13

Med
Member
Registered: 2011-08-08
Posts: 16

Re: [SOLVED] GNOME assigns drives to the wrong seat

So, fiddling around a bit and looking at the wiki I realized that the way I assigned seats was probably incorrect (I made this setup something like 5 years ago and I am not certain where I got the information back then). Essentially, identifying the shared USB ports again as indicated on the wiki, I realized that

loginctl attach seat1 DEVICEPATH

did not generate the same udev rules I add. For instance I had:

TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb1/1-1/*", ENV{ID_SEAT}="seat1"

when loginctl generated:

TAG=="seat", ENV{ID_FOR_SEAT}=="usb-pci-0000_00_14_0-usb-0_1", ENV{ID_SEAT}="seat1"

Interestingly, this did not cause any issue for keyboard/mouse. In any case, thanks a lot for your help, that ultimately put me on the right track.

Offline

#6 2021-10-16 20:24:18

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: [SOLVED] GNOME assigns drives to the wrong seat

You're welcome. Glad I could help.

For reference, my journey on the multiseat road is on the forum. I seemingly talked to myself a lot...
My initial success

And here is the page you can see my rules as reference. They are still valid today. Hard to believe I am still running the same hardware seven years later. I did make a reinstall after a hard drive swap, and I only needed to copy my rules and multiseat was running again.

Offline

Board footer

Powered by FluxBB