Stable release | |
---|---|
Repository | |
Operating system | Linux |
Platform | GNOME |
Type | abstraction layer for the files system |
License | LGPL-2.0-or-later |
Website | wiki |
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 (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 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 ftp://username:password@ftp.example.net/public_html, but are also mounted in the traditional manner under ~/.gvfs/
or /run/user/$UID/gvfs
or $XDG_RUNTIME_DIR/gvfs
directory [3] [4] to make them available to applications using standard POSIX commands and I/O.
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 [6] 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. [7] It consists of two parts: [8]
A collection of command-line utilities (such as gvfs-mount, gvfs-less) works with VFS resources. [9]
Daemon | task |
---|---|
Main | |
gvfsd | gvfsd is the main daemon of GVfs. It provides the "org.gtk.vfs.Daemon" name on the session bus. gvfsd is autostarted by GIO clients if it is not running. The primary task of gvfsd is to act as a mount tracker/manager. It spawns new back-ends when requested and keeps track of their lifecycle, maintaining a list of active mounts and creates direct connections to them. gvfsd also starts the gvfsd-fuse(1), and provides it the mount point where the fuse file system should be mounted. |
gvfsd-fuse | gvfsd-fuse maintains a FUSE (Filesystem in Userspace) mount to make GVfs back-ends available to POSIX applications. The mount point for the fuse filesystem is provided by the [PATH] argument. gvfsd-fuse is normally started by gvfsd. |
gvfsd-metadata | gvfsd-metadata is a daemon acting as a write serialiser to the internal gvfs metadata storage. It is autostarted by GIO clients when they make metadata changes. Read operations are done by client-side GIO code directly, and don't require the daemon to be running. The gvfs metadata capabilities are used by the GNOME Files file manager, for example. |
Volume monitors | |
gvfs-goa-volume-monitor | support for GNOME Online Accounts (cf. GNOME Online Accounts in the GNOME wiki) |
gvfs-gphoto2-volume-monitor | support for the Picture Transfer Protocol as implemented in gPhoto |
gvfs-mtp-volume-monitor | support for the Media Transfer Protocol |
gvfs-udisks2-volume-monitor | The gvfs-udisks2-volume-monitor process is responsible for the disks, media, mounts and fstab entries shown in the desktop user interface. In particular, GNOME Shell, GNOME Files as well as any other application using the GLib APIs, is using information from this process. [5] In Debian it 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] udisks: The udisks daemon 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. |
gvfs-afc-volume-monitor | support for Apple File Conduit |
Mount back-ends | |
gvfsd-afc | mounts iPhone/iPod touch volumes |
gvfsd-afp | mounts Apple Filing Protocol volumes |
gvfsd-afp-browse | browses Apple Filing Protocol volumes |
gvfsd-archive | mounts archive files in various formats |
gvfsd-burn | provides a location for burning CDs/optical discs |
gvfsd-cdda | mounts audio CDs |
gvfsd-computer | provides computer:// |
gvfsd-dav | mounts DAV filesystems |
gvfsd-dnssd | browses DNS-SD |
gvfsd-ftp | mounts over FTP |
gvfsd-gphoto2 | mounts over PTP, meaning GVfs uses libgphoto2 to expose on-camera photos to GNOME applications via the VFS |
gvfsd-http | mounts over HTTP |
gvfsd-localtest | a test backend |
gvfsd-mtp | mounts over MTP |
gvfsd-network | provides network:// |
gvfsd-nfs | mounts over NFS protocol |
gvfsd-recent | provides recent:// |
gvfsd-sftp | mounts over sftp |
gvfsd-smb | mounts SMB (i.e. Windows Shares Filesystem) volumes |
gvfsd-smb-browse | browses Windows Shares Filesystem volumes |
gvfsd-trash | provides trash:// |
Please refer to https://wiki.gnome.org/Projects/gvfs/backends for the official documentation.
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. systemd-udevd
receives such events and responds to them according to its quite comprehensive configuration:
/dev
, hence systemd-udevd dynamically creates and removes device nodes from /dev, it also loads drivers as necessary at boot timeudisksd
, 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).
In Debian the GVfs is packaged into four packages: gvfs, gvfs-daemons, gvfs-bin and gvfs-backends.
Cygwin is a free and open-source Unix-like environment and command-line interface (CLI) for Microsoft Windows. The project also provides a software repository containing many open-source packages. Cygwin allows source code for Unix-like operating systems to be compiled and run on Windows. Cygwin provides native integration of Windows-based applications.
GNU Hurd is a collection of microkernel servers written as part of GNU, for the GNU Mach microkernel. It has been under development since 1990 by the GNU Project of the Free Software Foundation, designed as a replacement for the Unix kernel, and released as free software under the GNU General Public License. When the Linux kernel proved to be a viable solution, development of GNU Hurd slowed, at times alternating between stasis and renewed activity and interest.
GNOME Files, formerly and internally known as Nautilus, is the official file manager for the GNOME desktop. GNOME Files, same as Nautilus, is a free and open-source software under the terms of the GNU Lesser General Public License.
A virtual file system (VFS) or virtual filesystem switch is an abstract layer on top of a more concrete file system. The purpose of a VFS is to allow client applications to access different types of concrete file systems in a uniform way. A VFS can, for example, be used to access local and network storage devices transparently without the client application noticing the difference. It can be used to bridge the differences in Windows, classic Mac OS/macOS and Unix filesystems, so that applications can access files on local file systems of those types without having to know what type of file system they are accessing.
GnomeVFS was an abstraction layer of the GNOME platform for the reading, writing and execution of files. Before GNOME 2.22 GnomeVFS was primarily used by the appropriate versions of Nautilus file manager and other GNOME applications.
9P is a network protocol developed for the Plan 9 from Bell Labs distributed operating system as the means of connecting the components of a Plan 9 system. Files are key objects in Plan 9. They represent windows, network connections, processes, and almost anything else available in the operating system.
The Media Transfer Protocol (MTP) is an extension to the Picture Transfer Protocol (PTP) communications protocol that allows media files to be transferred automatically to and from portable devices. Whereas PTP was designed for downloading photographs from digital cameras, Media Transfer Protocol allows the transfer of music files on digital audio players and media files on portable media players, as well as personal information on personal digital assistants. MTP is a key part of WMDRM10-PD, a digital rights management (DRM) service for the Windows Media platform. In 2011, it became the standard method to transfer files to and from Android.
Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a bridge to the actual kernel interfaces.
udev is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raised when hardware devices are added into the system or removed from it, including firmware loading as required by certain devices.
Unix-like operating systems identify a user by a value called a user identifier, often abbreviated to user ID or UID. The UID, along with the group identifier (GID) and other access control criteria, is used to determine which system resources a user can access. The password file maps textual user names to UIDs. UIDs are stored in the inodes of the Unix file system, running processes, tar archives, and the now-obsolete Network Information Service. In POSIX-compliant environments, the shell command id
gives the current user's UID, as well as more information such as the user name, primary user group and group identifier (GID).
A file system API is an application programming interface through which a utility or user program requests services of a file system. An operating system may provide abstractions for accessing different file systems transparently.
D-Bus is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project, initiated by GNOME developer Havoc Pennington to standardize services provided by Linux desktop environments such as GNOME and KDE.
FTPFS refers to file systems that support access to a File Transfer Protocol (FTP) server through standard file system application programming interfaces (APIs).
In computing, mount
is a command in various operating systems. Before a user can access a file on a Unix-like machine, the file system on the device which contains the file needs to be mounted with the mount command. Frequently mount
is used for SD card, USB storage, DVD and other removable storage devices. The command is also available in the EFI shell.
In Unix-like operating systems, a loop device, vnd, or lofi is a pseudo-device that makes a computer file accessible as a block device.
GNOME Commander is a 'two panel' graphical file manager for GNOME. It is built using the GTK+ toolkit and GVfs.
Fiwix is an operating system kernel based on the UNIX architecture and fully focused on being POSIX compatible. It is designed and developed mainly as a hobbyist operating system, but it also serves for educational purposes. It runs on the i386 hardware platform and is compatible with a good base of existing GNU applications. It follows the UNIX System V application binary interface and is also mostly Linux 2.0 system call ABI compatible.
The Linux booting process involves multiple stages and is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Although the Linux booting process depends very much on the computer architecture, those architectures share similar stages and software components, including system startup, bootloader execution, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons. Those are grouped into 4 steps: system startup, bootloader stage, kernel stage, and init process. When a Linux system is powered up or reset, its processor will execute a specific firmware/program for system initialization, such as the power-on self-test, invoking the reset vector to start a program at a known address in flash/ROM, then load the bootloader into RAM for later execution. In IBM PC–compatible personal computers (PCs), this firmware/program is either a BIOS or a UEFI monitor, and is stored in the mainboard. In embedded Linux systems, this firmware/program is called boot ROM. After being loaded into RAM, the bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it, and then pass control to this kernel image. The second-stage bootloader also performs several operation on the system such as system hardware check, mounting the root device, loading the necessary kernel modules, etc. Finally, the first user-space process starts, and other high-level system initializations are performed.
GIO is a library, designed to present programmers with a modern and usable interface to a virtual file system. It allows applications to access local and remote files with a single consistent API, which was designed "to overcome the shortcomings of GnomeVFS" and be "so good that developers prefer it over raw POSIX calls."
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manager" — an init system used to bootstrap user space and manage user processes. It also provides replacements for various daemons and utilities, including device management, login management, network connection management, and event logging. The name systemd adheres to the Unix convention of naming daemons by appending the letter d. It also plays on the term "System D", which refers to a person's ability to adapt quickly and improvise to solve problems.