/media was a very comfortable thing standardized by FHS. After introduction of desktop based udisks mounts, the directory became empty. Paths like /run/media/me/directory or /run/user/1000/gvfs are used nowadays. When used from a terminal, it is very uncomfortable.

As mounts are private to users, the old style of /media use cannot be returned back. But with a kernel namespaces feature, it is possible to make private mounts, and each user can see a different contents of /media.

This is a way, how /media can be returned back with respect to the udisks.

Looking for mad skills in:

Nothing? Add some keywords!

This project is part of:

Hack Week 17

Activity

  • 3 months ago: mkubecek liked Bring /media directory back
  • 3 months ago: gniebler liked Bring /media directory back
  • 3 months ago: jbrielmaier liked Bring /media directory back
  • 3 months ago: sbrabec started Bring /media directory back
  • 3 months ago: sbrabec originated Bring /media directory back
  • Show History

    Comments

    • gniebler
      3 months ago by gniebler | Reply

      Hi! I find your project interesting. I've been reading up on the various namespaces the Linux kernel offers in the scope of my own HackWeek project.

      Is the idea to run all/some of a user's processes in a separate mount namespace and (bind) remount all their stuff from

      • /run/media/${user} or
      • /run/user/${UID} under /media in the users own mount namespace?

      If so, that sounds like a really interesting application of this kernel feature and I'm curious to see how it could be done persistently and without conflicting with other systems that leverage mount namespaces (like containers).

      • sbrabec
        3 months ago by sbrabec | Reply

        This is not done permanently. It is done per PID and the namespace is inherited from the display manager initialization. pam_namespace does exactly that.

    • sbrabec
      3 months ago by sbrabec | Reply

      Submitted to OSC as filesystem-media. Currently in my home.

    • sbrabec
      3 months ago by sbrabec | Reply

      To be completely finished, it needs to fix some problem with integration with udisks2. See FIXME in the repo.

    Similar Projects

    This project is one of its kind!