You are not logged in.

#1 2012-07-12 11:37:40

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

Why /run ???

Don't know whether this is the right place to ask this question but there is something I wanna know:

What was the argumentation behind implementing a /run directory? To me it appears to be an unnecessary complication and after /mnt now /media remains also orphan?

What are the benefits of restructuring the / this way?

Offline

#2 2012-07-12 11:56:41

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: Why /run ???


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#3 2012-07-12 11:59:45

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: Why /run ???

You have a read-write directory that exists from the very beginning of the boot process until shutdown. This is what /var/run was always supposed to be, but never was.

Offline

#4 2012-07-12 12:29:09

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

Re: Why /run ???

Thanks for the answers. Especially the link given by ebal explained a lot to me. But still there is something that troubles me:

Why is it, that media have to be mounted in /run/user/media? It's quite a long path if you want to access your external devices via bash. To me a toplevel directory, be it /mnt or be it /media, did make a lot more sense. Are there any problems to be expected if I set a link /var/user/media to /media?

Offline

#5 2012-07-12 12:35:54

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Why /run ???

You should just mount media under /mnt that's why it's there in the first place. The switch to /media and now /run/media is unnecessary

Offline

#6 2012-07-12 16:29:21

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Why /run ???

@Wilco: you are missing the point on the distinction between /mnt and /media (the former is for manually created mount-points by the admin mounted either manually or thorough fstab, the latter for dynamically created/mounted mount-points by some storage daemon).

@macaco: The reason for the move to user-specific media folders is that (possibly auto-)mounted removable media should only be accessible to the user who mounted them (imagine usb sticks at an internet-cafe using multi-seat computers, this sort of thing).

Offline

#7 2012-07-12 16:53:12

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: Why /run ???

(imagine usb sticks at an internet-cafe using multi-seat computers, this sort of thing)

during full moon, in transylvania, when you have eaten something after midnight. big_smile

such a huge amount of crap being pushed to us linux users lately...

Offline

#8 2012-07-12 18:20:06

Bellum
Member
Registered: 2011-08-24
Posts: 230

Re: Why /run ???

Don't see the big deal. If you're using a file manager the directory will appear on the left panel. If you're using bash, you're using tab completion anyway. I suppose it could break scripts?

Offline

#9 2012-07-12 21:43:57

eldragon
Member
From: Buenos Aires
Registered: 2008-11-18
Posts: 1,029

Re: Why /run ???

symlink /run/user/media to where you want it.

quit whining

Offline

#10 2012-07-13 01:02:09

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: Why /run ???

bangkok_manouel wrote:

(imagine usb sticks at an internet-cafe using multi-seat computers, this sort of thing)

during full moon, in transylvania, when you have eaten something after midnight. big_smile

such a huge amount of crap being pushed to us linux users lately...

Perhaps you're confusing 'choice' with 'I want it my way'?

I've never understood the need for a separate /media anyway. For GUI users it makes exactly zero difference, for CLI users a bit more but its like two to 4 more keys (and symlinks work as well).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2012-07-13 02:39:58

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Why /run ???

bangkok_manouel wrote:

(imagine usb sticks at an internet-cafe using multi-seat computers, this sort of thing)

during full moon, in transylvania, when you have eaten something after midnight. big_smile

such a huge amount of crap being pushed to us linux users lately...

Meh, maybe I should not try to give examples.

The point is that we want to design systems in such a way that they "just work" on the widest possible range of use-cases, now and in the future, including ones we haven't thought of. And by "just work", I also mean that there should be no security holes. As UNIX is essentially a multi-user system, we better make sure it works soundly with more than one user. Previous solution to this problem was either unsafe, or it required manual hacking/tweaking....

Offline

#12 2012-07-13 04:23:18

Zancarius
Member
From: NM, USA
Registered: 2012-05-06
Posts: 207

Re: Why /run ???

ngoonee wrote:

I've never understood the need for a separate /media anyway. For GUI users it makes exactly zero difference, for CLI users a bit more but its like two to 4 more keys (and symlinks work as well).

Plus, shell users are more likely to mount disks manually, and /mnt is shorter than /media. Though, tab-completion probably renders the whole thing moot.


He who has no .plan has small finger.
~Confucius on UNIX.

Offline

#13 2012-07-13 13:23:36

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

Re: Why /run ???

eldragon wrote:

symlink /run/user/media to where you want it.

quit whining


Means I can put the symlink to /media and thus remain my shell habits unchanged?

Offline

#14 2012-07-13 13:30:41

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Why /run ???

@macaco: that should work, but notice that you will have one folder per user, so the /media symlink will only point to one of them...

Offline

#15 2012-07-13 16:12:42

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: Why /run ???

I find that there is so many concepts, starting from console-kit, to udisk, to gvfs, and so forth
- and all for the purouse of automagical mounting for the user.

It all feels very convoluted and overdone somehow.

For me though, as a desktop user with self-granted sudo rights;

I find having everything manually set up in fstab, both internal and my sometimes-used-usb media with UUID and 'noauto'
Is much more kiss and easy.

With bash-history-completion aswell, everything is just a quick: sudo mount <TAB> <ENTER> away.

It just feels more "clean" to me smile

Last edited by PReP (2012-07-13 16:13:04)


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#16 2012-07-13 22:55:33

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: Why /run ???

Good for you.  In case you haven't noticed, "automagical mounting" of arbitrary devices is rather important to a lot of people, and that's why we have choices as to what sort of mounting mechanism to implement.  (Also, polkit/consolekit/systemd-logind do a heck of a lot more than just assigning of mount permissions ...)

As far as symlinking /run/user/media to /media, in a multiuser system if it's that important to have everything in /media while using udisks2 couldn't you write a one-line command to stick in your users' bash_profile then add a sudo nopasswd entry for that command?

Last edited by ZekeSulastin (2012-07-13 22:59:11)

Offline

#17 2012-07-13 23:32:32

progandy
Member
Registered: 2012-05-17
Posts: 5,180

Re: Why /run ???

tomegun wrote:

@macaco: that should work, but notice that you will have one folder per user, so the /media symlink will only point to one of them...

Maybe a FUSE filesystem that redirects the users to their respective mount folders would be the way to go if you want to keep /media with udisks2?


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#18 2012-07-14 11:32:11

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

Re: Why /run ???

I will stick to the symlink solution because on my system there is just one user - I just run Arch on my Laptop, which hopefully will not fall into other hands than mine wink

bangkok_manouel wrote:

(imagine usb sticks at an internet-cafe using multi-seat computers, this sort of thing)

during full moon, in transylvania, when you have eaten something after midnight. big_smile

such a huge amount of crap being pushed to us linux users lately...

Well... even if it does not come in handy for me, I understand the idea behind it. Since the old unix days the multiuser approach has been one of the main advantages, don't you think? And as /run is likely to be more widespread in the near future it might be better getting used anyway...

Last edited by macaco (2012-07-14 11:36:17)

Offline

Board footer

Powered by FluxBB