Re: concurrent X users and gnome-volume-manager
Received Sun 19 Dec 2004 8:31pm +1100 from Sven Luther:
> On Sun, Dec 19, 2004 at 10:58:31AM +1100, Graham Williams wrote:
> > Received Sun 19 Dec 2004 5:37am +1100 from Sven Luther:
> > > On Sat, Dec 18, 2004 at 05:35:06PM +0100, Sjoerd Simons wrote:
> > > > On Sat, Dec 18, 2004 at 05:32:26PM +0100, Sven Luther wrote:
> > > > > On Sat, Dec 18, 2004 at 03:56:42PM +0000, Sam J wrote:
> > > > > > Marcelo E. Magallon wrote:
> > > > > > >On Sat, Dec 18, 2004 at 07:03:22AM +1100, Graham Williams wrote:
> > > > > > >
> > > > > > > > At any time on one machine (home machines running Debian unstable) I
> > > > > > > > allow multiple users to have their X sessions running concurrently
> > > > > > > > (e.g., on tty7, tty8, etc). I've not yet figured out how to get
> > > > > > > > gnome-volume-manager working happily in this situation.
> > > > > > > My initial reaction is "sorry, you loose".
> > > > > > Could g-v-m be configured to use the "users" option instead of "user"?
> > > > > > According to mount(8), it should allow any user to unmount the device
> > > > > > regardless of who mounted it.
> > > > > yes, but this alone will not do. you also need to make the files available, so
> > > > > a group and the right gid options would be best in this circunstance.
> > > > Please first define the behaviour you would like to see, before going into
> > > > implementation details.. Do you want everyone to be able to umount all
> > > > removable devices under all circumstances ? Or just in some cases or...
> > [...]
> > > Still, i understand that this is a maybe non-solveable usability issue. Let's
> > > go into this in detail, as you asked.
> > >
> > > 1) There is one physical machine, where stuff can be plugged into.
> > >
> > > 2) This machine usually has only one user holding the console, so this user
> > > is used by pmount, and everything works fine.
> > I guess the "first" running g-v-m that notices the new device gets to
> > assign its owner to the mounted device? (Each user may be running
> > g-v-m and I'm guessing one of them notices the new device first?)
> > > 3) In the case at hand, there are two X server running on the same machine
> > > and the same console. They are not active at the same time, and it would
> > > stand to reason that the expected behaviour would be for the user whose
> > > session is actually active to mount the stuff. I don't know if this is
> > > easily available as info though, but once you know this, the rest becomes
> > > easy.
> > Yes, if we could determine which of multiple X servers running on the
> > current console was the active one when the device is plugged in that
> > would be a start toward the solution. Another option is to open the
> > device up to everyone in group plugdev through fstab (as below) but
> > that is less than ideal:
> > /dev/usbkey /media/usbkey auto users,gid=plugdev,umask=0002,defaults 0 0
> > > Remaining problem is what to do about a plugged in USB stick, once you
> > > switch over to the other console. One solution would be a console user
> > > group, but again this poses security problems, altough rather limited ones.
> > Would not the use of the "users" option in mount be a help to the
> > solution here? The second user here just unmounts the device
> Well, you also want to access the files, not only umount it, right ?
> g-v-m/pmount/whatever also sets the uid of the mount to the first user running
> it. So you need to do a gid=plugdev as you did above, but this means that any
> user of the plugdev group may access the files.
I was thinking the second (i.e., current) user would umount the USB,
and then let their own g-v-m catch it as it is plugged in again, and
so they then get full access to the USB. A little inconvenient, but
could work logically from a user's point of view.
>From implementation point of view, would only work if there was some
way of "turning off" the first (non-current) user's g-v-m, and
"turning on" the second (current) user's g-v-m.