0

It can be /media/ or /media/$USER or /run/media/$USER depends on distro or customization. Is there a unified way to get its value programmatically regardless distros?

Wang
  • 7,250
  • 4
  • 35
  • 66
  • Maybe try in [Unix & Linux](https://unix.stackexchange.com/) and [Super User](https://superuser.com/), since there is nothing about programming in your question. – Jetchisel Dec 27 '22 at 15:40

1 Answers1

0

Have a look at this, where they reference a passage from the man page for :

UDISKS_FILESYSTEM_SHARED : If set to 1, the filesystem on the device will be mounted in a shared directory (e.g. /media/VolumeName) instead of a private directory (e.g./run/media/$USER/VolumeName) when the Filesystem.Mount() method is handled.

Eric Marceau
  • 1,601
  • 1
  • 8
  • 11
  • what you mentioned it is compiling time setting. And it can be 3 different paths instead of just 2. I doubt this can help. I simply just want a way to determine the distro's setting instead of manually put a dictionary – Wang Dec 31 '22 at 05:17
  • You might want to check out https://bbs.archlinux.org/viewtopic.php?id=259493 – Eric Marceau Dec 31 '22 at 05:20