On 01/03/18 02:53 AM, Roger Oberholtzer wrote:
On Wed, Feb 28, 2018 at 6:37 PM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
Again, show me how KDE does it for USB disk *with ext4 on it*. As a start, the mount directory belongs to the user. I just plugged in a ext4 USB disk, and the mount point in /run/media/roger/ is:
drwxr-xr-x 2 roger users 8192 Feb 1 2017 DriveA
It's mounted on a directory that belongs to me, that is also located in a directory that belongs to me. If course if there are things in the drive that do not belong to me, I can do nothing.
It is the mount point itself that I am concerned about.
I don't want this thread to be about KDE. It is about trying to make systemd automount work as I need.
From there on, please do check your man pages, as there is a chain of events, and you get to the udisku2 rule for dealing with that. udisks & udisks-daemon
There are two point here. The first, as I've said before is that a symlink from, say, /home/roger/USB to /run/media/roger/ is going to be useful in this case where the USB stick is automated there upon insertion. The second is about 'why it is dynamically mounted there?' Well, I insert a a usebstick with a ResiserFS backup of ~anton/ on it and it gets moutned # mount | grep sdb1 # mount | grep sdb1 /dev/sdb1 on /run/media/anton/ab669d53-2101-4353-ba5c-908a380e4cd6 type reiserfs (rw,nosuid,nodev,relatime,uhelper=udisks2) /dev/sdb1 on /var/run/media/anton/ab669d53-2101-4353-ba5c-908a380e4cd6 type reiserfs (rw,nosuid,nodev,relatime) Well that tells me something: uhelper=udisks2 But it is also present at /dev/disk/by-uuid/ab669d53-2101-4353-ba5c-908a380e4cd6 -> ../../sdb1 But what about that "uhelper=udisks2"? That tells me that it is a udisk2 rule based operation. I see in the logs that the insertion causes a kernel event trigger and that cascades -- well check your own logs for this as its a bit long winded to post here - and hands it to udisk2. The relevant line is: 2018-03-01T10:58:37.113152-05:00 main kernel: [13822.668328] usb 3-4: New USB device found, idVendor=05dc, idProduct=c75c What matters is that it gets handled by /lib/udev/rules.d/80-udisks2.rules: SUBSYSTEMS=="usb", ENV{ID_VENDOR_ID}=="05dc",ENV{ID_MODEL_ID}=="b049", ENV{ID_INSTANCE}=="0:1", ENV{ID_DRIVE_FLASH_SD}="1" polkit & polkitd And I find that KDE4 is quite consistent in all this as a top level UI since it is not KDE that is actually handling it :-) All KDE does is see the signal and let you start a browser - or not. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org