Userspace virtual filesystem software for the GNOME desktop environment
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.
A cause of confusion is the fact that the file system abstraction used by the Linux kernel is also called the virtual file system (VFS) layer. This is however at a lower level.
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 (codice_1) 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. GVfs does not seem to support the Files transferred over shell protocol (FISH).
GVfs also contains modules for GIO that implement volume monitors and the GNOME URI scheme handler configuration.
There is a set of arguments to the command line program "gio" that lets you run commands (like cat, ls, stat, mount, etc.) on files in the GVfs mounts.
Attached resources are exposed via a URI syntax, for example smb://server01/gamedata or [Email] but are also mounted in the traditional manner under codice_2 or codice_3 or codice_4 directory to make them available to applications using standard POSIX commands and I/O.
Technical details.
Along with generally useful APIs such as networking and D-Bus support, GIO also provides a VFS API to applications. GVfs provides implementations that go beyond that and allow to access files and storage using many protocols. GVfs provides implementations for various network file systems as loadable modules. Additionally GVfs also provides support for trash, network or recent folders, for CD burning and for monitoring interesting devices and volumes on the computer.
The goal of GVfs has been to overcome the shortcomings of GnomeVFS and provide an API that is so good that developers prefer it over raw POSIX calls. Among other things that means using GObject. It also means not cloning the POSIX API, but providing higher-level, document-centric interfaces. GTK can directly use it, e.g. in the filechooser.
Applications use GVfs indirectly, by means of GIO loading the GVfs module that implements the GIO extension points. The GVfs main daemon gvfsd spawns further mount daemons for each individual connection. The GVfs support for volume monitoring is included in a separate loadable module.
The actual GVfs implementation is distributed over a number of processes.
GVfs can use FUSE to mount its VFS directly onto the filesystem. It consists of two parts:
A collection of command-line utilities (such as gvfs-mount, gvfs-less) works with VFS resources.
Please refer to [URL] for the official documentation.
Hot plugging.
Devices connected over eSATA or USB are (supposed to be) physically hot-pluggable. When a device is physically connected to or physically removed from the computer system, the Linux kernel notices and sends out an event to user-space. codice_5 receives such events and responds to them according to its quite comprehensive configuration:
The udisks2 daemon codice_7 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 codice_11 utility, which can be used to trigger these operations from the command line (if permitted by PolicyKit).
Packaging.
In Debian the GVfs is packaged into four packages: gvfs, gvfs-daemons, gvfs-bin and gvfs-backends.
References.
 ;templatestyles src="Reflist/styles.css" / ;