I have a large number of potential USB drives, and would like them to be mounted under /media/user/, like in Ubuntu. In Fedora however it is /run/media/user.
And I don’t want to add lines to /etc/fstab whenever another USB drive is attached.
(Alas, it wasn’t permitted to link to the discussion here, where the /etc/fstab workaround was shown. So I had to remove it.)
One reason for my question/request is ‘locate’. /run can’t be reasonably included by updatedb. However, I can remove the pruning on /media. And then, for any USB drive, I can search files and folders within a second or two.
The choice whether udisks (*) mounts USB file systems in /run/media/$USER or in /media/$USERis a compile time decision.
Due to that, the best way to change the behavior of udisks on your Fedora installation, is to rebuild the udisks2 package with the --enable-fhs-media flag.
*) The system responsible for automatically mounting removable drives.
Thanks for the quick and complete answer!
I AM a tad surprised; it looks so window-ish, and so last century to hardcode something like this.
Do you think it made sense to file a RFE to make the option user-configurable (with a sensible default) for users to decide where they want their external removal drives to be mounted?
I think it is a great idea! I was considering doing that, but I didn’t think that I can represent the use case properly (as the current setup works for me) - but please do that! If you do - it’ll be great if you can also link here the ticket that you’ve opened - in case someone else stumbles into this thread and wants to follow up on this.
Unfortunately turned down by the responsable at KDE. I should take the liberty and recompile Dolphin. Or use partition manager.
I had outlined my use case, and while these are workarounds, modification in Settings would be a hundred times easier. Alas.
IIUC this is not KDE, it’s at a lower level, in some part of udisks. In Ubuntu, they’ve made the /media choice, but not (it appears) Fedora. The KDE folks don’t build the OS. Recompiling dolphin wouldn’t affect this.
@udippel - I think you misunderstood me - the system that mounts USB drives under /user/media isn’t part of KDE and is not controlled by the KDE project.
In my detailed reply above I linked to the GitHub repository where that configuration lives. If you want to petition someone to have the option runtime configurable - you should post an issue there.
The other alternative is to petition Fedora to change how they build udisks2 because the non-FHS mode is the legacy setup and Fedora should be moving forward. Or you can petition Fedora to develop the runtime configuration for udisks2 themselves.
The only thing that can be done on KDE side is to develop a whole new system that somehow takes over from udisks, while KDE is in session, and replace it with something else that isn’t compatible and will be different than how all other desktop environment on Linux are doing things - and this won’t happen, for obvious reasons.
Thanks for the clarifications!
I simply wasn’t aware of the depth to which a standard folder structure would go. And principally I don’t agree - though that’s my problem, my opinion and my view only - that a parameter like this is far too close to the user to be hard coded, and should be configurable by the user, at least root.
“Removable drive” will often be a USB drive, thumbdrive, on a system of a single user. Then /media/user could well be just /media. Or even /home/user/media.
I agree, which is why I suggested that you open a ticket about it and link it here - so that I can follow up and agree with the need for a change.
Regarding /media/$USER vs. /media - which I think is what you meant by that last paragraph, though I may be mistaken - the default configuration on most systems is to mount removable drives in a user-specific directory for the user that is currently in the active seat (the concept of multi-seat installation is kinda new at least in the ability of common system services to support it, and I won’t go into it here). But there is a documented way to change that behavior so that removable media will be mounted in a “user agnostic” way to a global system directory - /media (or /run/media as the case is for “non-FSH compatible” udisks setups like Fedora) - you can read about it in the Arch Wiki: udisks - ArchWiki - this is locally configurable and doesn’t require rebuilding software, though it is very deep system administration stuff.
Foot Notes
FSH is the “File System Hierarchy” standard from the Linux Foundation which defines what directories are used for what things, and defines the “Mount point for removable media” as /media and describes /run as a place to store process ID files and sockets, and other per-boot system information data.
Thanks a bunch, yet again!
NOW it is solved, I read up on this stuff, sorry, didn’t know it was decided in udev2.
I AM disappointed with the state of FOSS, though. 20 years ago, when I was teaching my students at university and was a part-time developer myself, I had hoped to instil some concepts of simplicity, ready usability, convenience into their work with FOSS.
With cryptic stuff left to Windows. We were aware that the takeup of FOSS, especially Linux, would depend on ready usability and configurability.
In W10 removable drives are still hanging about in an isolated manner on the left side of Explorer. These are at least auto-mounted. Here they just show. And right-click doesn’t give me on option for auto-mount. “For security reasons” I can’t mount those to /home/user/media; at least not without “cryptic” commands on the command line. And one has to RTFM, to decide if those should be private or system-wide. At a mount point that “mummy knew best”.
Thanks again, you are a most helpful person, and I wish there were more like you, active in the potentially world-shattering FOSS project.
You can exactly NOT do this any longer. It was removed (by KDE?), at least on Ubuntu and Fedora.
And exactly this point was the start of this thread. Earlier, I could fine-tune auto-mount (nobody talks about silly autorun! btw.) in System Settings, as you can see in the attached screen shot.
Recently, System Settings is down to a three-liner for Removable Dribes, with a generic setting for all, and two lines without any user configuration.
I for one don’t call that progress, but regress.
the whole background here: My data in the cloud are on a ‘removable’ drive, actually built in the laptop, not easily accessible. Earlier I could click that drive and ‘automount’, and it would be mounted before the cloud synchronization set in.
I mean, the user could set it to automount in the GUI, System Settings. With the recent iterations of KDE, the user has to set this automount through the command line, in /etc/fstab. Because that fine-tuned GUI-auto-mount (existing in e.g. ubuntu until 22.04) is gone.