Giter VIP home page Giter VIP logo

Comments (4)

coldfix avatar coldfix commented on June 12, 2024

Hey,
udiskie uses UDisks2 as a backend to perform the mount operation. The UDisks API has no parameter to customize the mount location (I guess: security concerns), so this can't be done in udiskie. See also #1.
There might be configuration in UDisks2 to customize the mount points but I don't know about that.
You could create a symlink to the directory, you want to user. I.e. something like

sudo rmdir /var/run/media/your_username
sudo ln -s /media /var/run/media/your_username

EDIT:
You can also try out the udev rule as suggested in this thread.

from udiskie.

coldfix avatar coldfix commented on June 12, 2024

Ok, I finally took the time to look at the UDisks2 source to see if anything can be done about this issue. In the function src/udiskslinuxfilesystem.c:calculate_mount_point one can see that the locations are indeed hard coded. Setting the UDISKS_FILESYSTEM_SHARED environment variable (for the UDisks process, not for udiskie!) will yield the old behaviour, i.e. mount everything in /media.
If you want a way to customize the mount point, you should contact the udisks devs (if there is not already an issue about this).

I hope, I could be of some help.

Best regards,
Thomas

from udiskie.

opensamba avatar opensamba commented on June 12, 2024

Well, I hoped to find a config file like in udevil, but ok.

I found something here
https://wiki.archlinux.org/index.php/Udisks

if you add this new file in udev rules should work:

  1. create a new file /etc/udev/rules.d/99-udisks2.rules
  2. copy&paste this line and save
    # UDISKS_FILESYSTEM_SHARED
    # ==1: mount filesystem to a shared directory (/media/VolumeName)
    # ==0: mount filesystem to a private directory (/run/media/$USER/VolumeName)
    # See udisks(8)
    ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"
  1. attach your usb drive and check if now udiskie mount in /media

bye

from udiskie.

amckinlay avatar amckinlay commented on June 12, 2024

@coldfix UDISKS_FILESYSTEM_SHARED is a udev environment variable -- it doesn't work as an environment variable for udisksd or udisksctl (I tried).

from udiskie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.