Chris Marusich <[email protected]> writes: >> Some udev rules might be enough though. > > That could very well be true! I don't know a lot about how the various > desktop environments like GNOME auto-mount removable storage devices, > but I'd be surprised if you couldn't whip something up with udev rules.
Thinking about it, I don't think that would work. I haven't tested the
following, but let's consider the Udev rule:
(define %automount-udev-rule
(udev-rule
"90-automount.rules"
(string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\",
SUBSYSTEM==\"usb\", "
"RUN+=\"/run/current-system/profile/bin/udisksctl
mount -b /dev/%k\"")))
It would mount the drive as root, not for the current user.
It's possible to mount the drives for every one though:
(define %automount-udev-rule
(udev-rule
"90-automount.rules"
(string-append "KERNEL=\"sd[a-z][0-9]\", ACTION==\"add\",
SUBSYSTEM==\"usb\", "
"ENV{UDISKS_FILESYSTEM_SHARED}=\"1\","
"RUN+=\"/run/current-system/profile/bin/udisksctl
mount -b /dev/%k\"")))
Conclusion: a udev rule might solve part of the problem (auto-mounting) but
it does not allow for per-user mount points.
In the end, udiskie might be the better option. What do you think?
--
Pierre Neidhardt
signature.asc
Description: PGP signature
