Why does my external USB hard drive show up in "/run/media/<user>/media"?

So I have this external hard drive, I plug it in, and it automatically shows up in the dolphin file viewer. I’m more comfortable looking at things in the terminal now so I try to go into /media, but it’s not there! After some searching, I find it in /run/media/<user>/media.

So, what’s the deal here?
Is this the default behavior?
Can I change something to make it appear in /media?

Thanks,
Walter

udisks2 mounts partitions/disks to /run/media/$USER by default, only accessible to that particular user. And udisks2 is used by KDE for mounting external media since openSUSE 12.3.

Is this the default behavior?

Yes.

Can I change something to make it appear in /media?

See https://wiki.archlinux.org/index.php/Udisks#Mount_to_.2Fmedia_.28udisks2.29 .
That’s from the Arch Wiki, but should apply the same to openSUSE. There is an openSUSE bug report which also describes how to make this change, I just took that particular one as it was the first search result on google for “udisks2 shared mount”…

Or creating an entry in /etc/fstab would allow you to specify the exact mount point (add the “noauto” mount option to prevent it from being mounted on boot, and add the “user” option to allow mounting by a user, but this won’t work with NTFS-3g I think).

I created a symlink:


cd $HOME
ln -s /run/media/$USER media

Now, I can look for a USB under “media” in my home directory.

(And if they again change the default place to mount, I can change that symlink to match).

Great info! Thanks for the help. I like the symlink idea.

On 2015-05-21 20:26, whannah wrote:

> So, what’s the deal here?
> Is this the default behavior?

Yes. Since 12.3 or earlier, maybe 12.2.

It was documented on the release notes years ago.

> Can I change something to make it appear in /media?

Yes.

Create “/etc/udev/rules.d/99-correct-media-mount-point.rules” with:


ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="1"

and run “udevadm control --reload”

That’s what I do. Of course, you also have to make sure that the /media directory exists.

A problem remains, that it is not a tmpfs, so if mount points are somehow not removed after umounting a device, they will remain there across reboots.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

You will also find it in /var/run/media/<user>/media.

Yes, that could happen …

I am now half waiting for "them" to deprecate the ability to mount volumes by label (which is something that I and Carlos like doing on our systems) because "them" have a "better idea" how it should be done and "them" do not like us using our systems the way we want to use them.

You know, like the KDE "them" gang …>:)

I don’t think you can blame that particular “them” for “systemd”.

Sometimes its just easier to go along than to fight city hall.

To be honest, some of the changes over the years have been good. The organization is more systematic, less ad hoc. However, they are not so good at teaching us old dogs new tricks.

Not for systemd, for deprecating my (and others’) preferred method of using Virtual Desktops instead of Activities:

https://bugs.kde.org/show_bug.cgi?id=343246

Actually, I should probably add here that I am not one of the people who have a problem with systemd.

It has not caused me any problems.

My only gripe about it, so far, is that some of the developers of some of the modules claim functions of their modules are superior to everything else (such as chroot), but obviously have not fully tested nor fully developed them, because the particular modules in question just simply do not do as they claim.

nrickert donned his tin foil hat and penned:

be honest, some of the changes over the years have been good. The
> organization is more systematic, less ad hoc. However, they are not so
> good at teaching us old dogs new tricks.
>
>

Oh so true so very true, sorry gone into old f*rt mode.


Mark
Nullus in verba
Caveat emptor
Nil illigitimi carborundum

Correct.
/var/run/ is a symlink to /run/…

Well, there’s at least chance for an activity switcher that works like the virtual desktop switcher/pager:
https://bugs.kde.org/show_bug.cgi?id=346684
https://bugs.kde.org/show_bug.cgi?id=347665

If you can use activities the same way as virtual desktops, there’s probably no need for you to use virtual desktops?

And for others: separate wallpapers for each virtual desktops has a chance to return as well in one of the next versions AFAIK.

What they don’t want to add again is the option to have implicit separate activities on each virtual desktop. Apparently that complicated the code and caused other issues.

Oh, and I don’t understand why systemd got brought up here again. udisks2 has nothing to do with systemd. It’s totally independent, and not even by the same developers…

Just as an example of the changes made by “them” that are not always appreciated by “us”.

Yes.

nrickert thought my whine against the VD change was actually about systemd, when it was not…:slight_smile:

… but, of course, this is starting to get too far off topic, now.