• Udev rule for mounting removable drives under /media/$user


    Dear all,

    coming from Debian, I have several scripts that assume external media are auto-mounted dynamically under /media/$user/LABEL instead of /run/media/$user/LABEL.

    I did find a rule to mount the drives under /media/LABEL but I’d like to get the $user in there. Of course I could change all the scripts, but that would make them unusable under my dual boot LMDE.

    Simplest would be of course to make an symlink from /media to /run/media. That works for about 80% but some scripts (e.g. conky) actually check the device is mounted on a specific mountpoint.

    Thanks!

    Dell Latitude E6230 with Intel i7, 8GB RAM, 500 GB SSD
    dual boot: Antergos and Debian Stretch both 64bit and running gnome-shell
    surviving in a Windows world with VMware WS and Codeweavers Crossover

  • Dear all,

    coming from Debian, I have several scripts that assume external media are auto-mounted dynamically under /media/$user/LABEL instead of /run/media/$user/LABEL.

    I did find a rule to mount the drives under /media/LABEL but I’d like to get the $user in there. Of course I could change all the scripts, but that would make them unusable under my dual boot LMDE.

    Simplest would be of course to make an symlink from /media to /run/media. That works for about 80% but some scripts (e.g. conky) actually check the device is mounted on a specific mountpoint.

    Thanks!

    Dell Latitude E6230 with Intel i7, 8GB RAM, 500 GB SSD
    dual boot: Antergos and Debian Stretch both 64bit and running gnome-shell
    surviving in a Windows world with VMware WS and Codeweavers Crossover

  • Hi,

    Arch follows upstream for most configurations so you’ll probably have to copy and then edit your scripts accordingly.

    Cheers!

  • Yeah, I figured that since I didn’t find any solution by searching the web. So far, things are working, so the pressure on following this further is low

    Cheers!

    Dell Latitude E6230 with Intel i7, 8GB RAM, 500 GB SSD
    dual boot: Antergos and Debian Stretch both 64bit and running gnome-shell
    surviving in a Windows world with VMware WS and Codeweavers Crossover

Posts 4Views 781
Log in to reply