GVfs

From Infogalactic: the planetary knowledge core
(Redirected from GVFS)
Jump to: navigation, search
GVfs
Stable release 1.26.2[1] / November 9, 2015; 8 years ago (2015-11-09)
Development status active
Operating system Linux
Platform GNOME
Type abstraction layer for the files system
Website wiki.gnome.org/Projects/gvfs

GVfs (abbreviation for GNOME Virtual file system) is GNOME's userspace virtual filesystem designed to work with the I/O abstraction of GIO, a library available in GLib since version 2.15.1. It installs several modules that are automatically used by applications using the APIs of libgio. There is also FUSE support that allows applications not using GIO to access the GVfs filesystems.

The GVfs model differs from e.g. GnomeVFS, which it replaces, in that file systems must be mounted before they are used. There is a master daemon (gvfsd) that handles coordinating mounts, and then each mount is (typically) in its own daemon process (although mounts can share daemon process).

GVfs comes with a set of back-ends, including trash support, SFTP, FTP, WebDAV, SMB, and local data via Udev integration, OBEX, MTP and others.[2]

GVfs also contains modules for GIO that implement volume monitors and the GNOME URI scheme handler configuration.

There is a set of command line programs starting with "gvfs-" that lets you run commands (like cat, ls, stat, etc.) on files in the GVfs mounts.

Attached resources are exposed via a URI syntax, for example smb://server01/gamedata or ftp://username:password@ftp.example.net/public_html, but are also mounted in the traditional manner under ~/.gvfs/ or /run/user/$USERNAME/gvfs or $XDG_RUNTIME_DIR/gvfs directory[3][4] to make them available to applications using standard POSIX commands and I/O.

Technical details

The option x-gvfs-show for the gvfs-udisks2-volume-monitor process determines whether a mounted device is shown or not[5] in GNOME Files. Screenshot of GNOME Disks.

GVfs may use FUSE,[6] and replaces the earlier GnomeVFS.[7] It consists of two parts:[8]

  1. a shared library which is loaded by applications supporting GIO
  2. GVfs itself, which contains a collection of daemons which communicate with each other and the GIO module over D-Bus.

A collection of command-line utilities (such as gvfs-mount, gvfs-less) works with VFS resources.[9]

GVfs uses libgphoto2 to expose on-camera photos to GNOME applications via a virtual filesystem.

GVfs uses udisks2. The gvfs-udisks2-volume-monitor process is responsible for the disks, media, mounts and fstab entries shown in the desktop user interface. In particular, the Desktop Shell (gnome-shell), the Files application (nautilus) as well as any other application using the GLib APIs, is using information from this process.[5]

The gvfs-udisks2-volume-monitor is distributed as part of the gvfs-daemons package.[10] It is not to be confused with udisksd and udisksctl, which are part of the udisks2 package.[11]

Hot plugging

Devices connected over eSATA or USB are supposed to be hot-pluggable. When a device is added or removed from the computer system, the Linux kernel notices and sends out an event. Systemd-udevd responds to this kind of events according to its quite comprehensive configuration. It dynamically creates and removes device nodes from the /dev filesystem, handles hotplug events and loads drivers at boot time. In case of a storage device systemd-udevd notifies udisksd, and gvfsd and gvfs-udisks2-volume-monitor.[12]

The udisks2 daemon udisksd serves as an interface to system block devices, implemented via D-Bus. It handles operations such as querying, mounting, unmounting, formatting, or detaching storage devices such as hard disks or USB thumb drives. This package also provides the udisksctl utility, which can be used to trigger these operations from the command line (if permitted by PolicyKit).

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. GNOME 2.22 Release Notes, 6.1: GVfs and GIO
  3. "Man page: gvfsd-fuse"
  4. http://askubuntu.com/a/281756
  5. 5.0 5.1 Lua error in package.lua at line 80: module 'strict' not found..
  6. gvfs status report, Alexander Larsson, mail.gnome.org, February 15, 2007
  7. GnomeVFS shortcomings
  8. "Using GNOMEvfs to manipulate files", Linux.com
  9. gvfs-mount, man page
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.