The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 22,487     Votes:  16     ✅ Solution
Tags: gvfs   mountpoint  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

Title: What is /run/user/1000/gvfs/
ID: /2018/05/12/What-is-_run_user_1000_gvfs_
Created: May 12, 2018    Edited:  April 11, 2023
Upload: September 20, 2023    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

All roads lead to Gnome

Ubuntu is based upon many things plus home-grown programming from Canonical (the owners of Ubuntu). Most people know it is based on Linux kernel and provides a “GNOME” Desktop environment. But it is also based on Debian and perhaps just as important Gnome Internals. It is so intrinsic I dare to say on Ubuntu that: “All roads lead to Gnome”.

What is GIO / gvfs?

In your question, /run/user/1000/gvfs/ the gvfs component stands for “Gnome Virtual File System”. Your camera and Android phones are mounted in this “User Space” outside of “Kernel Space” where a normal “mount” occurs.

To learn more about GIO (Gnome Input Output I surmise) see here and here. Ubuntu has a page about using GIO to mount devices using the gvfs-mount command.

The other component in your question /run/user/1000/gvfs/ is the /run/user component. This was created by systemd to circumvent using the /tmp directory which was common practice for such devices because it side-stepped network “rules”. See here.

The other part of your question is how is it different from /media?

The /media directory is where removable storage is located. The removable storage is in a familiar file format such as ext4, fat or ntfs. The device names and mount names are static.

Your Android phone is not just removable storage, but a removable foreign operating system that has storage. The storage is generally accessed with MTP. However, there is a host of programs to communicate with the phone. That is why it goes into /run/user/1000/gvfs. Samba also goes into the same directory chain, but I haven’t researched that one yet.

In the /run/user/1000 directory structure the mount names are dynamic and change with every connection. For example, my phone currently is:

$ ll /run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C013%5D
total 0
dr-x------ 1 rick rick 0 Dec 31  1969 ./
dr-x------ 3 rick rick 0 May  9 18:20 ../
drwx------ 1 rick rick 0 Dec 31  1969 Internal storage/
drwx------ 1 rick rick 0 Dec 31  1969 SD card/

The USB enumeration is notorious for changing, so you can be assured the directory name will be different next time. /media “stuff” on the other hand is static.

Notice the dates shown by Ubuntu 16.04 under Kernel 4.14.34. I haven’t had this Android Smartphone since the year 1969. I guess we can call this a bug.

⇧ How do I increase the font size in Ubuntu 18.04 LTS for a HDPI / 4K display? Upgraded to Ubuntu 18.04, but I still have old UI  ⇩