Jump to content

GVfs: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Citation bot (talk | contribs)
Added date. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | Category:GNOME | #UCB_Category 34/40
 
(48 intermediate revisions by 38 users not shown)
Line 1: Line 1:
{{short description|Userspace virtual filesystem software for the GNOME desktop environment}}
{{redirect-multi|2|GVFS|GNOME Virtual file system|the previous filesystem GNOME Virtual File System|GnomeVFS|VFS for Git (formerly known as Git Virtual File System or GVFS)|Virtual File System for Git}}
{{primary sources|date=February 2017}}
{{Infobox software
{{Infobox software
| name = GVfs
| name = GVfs
| title = GVfs
| title = GVfs
| latest release version = {{wikidata|property|preferred|references|edit|Q1533273|P348|P548=Q2804309}}
| logo = <!-- Image name is enough -->
| latest release date = {{wikidata|qualifier|preferred|single|Q1533273|P348|P548=Q2804309|P577}}
| logo caption =
| latest preview version = {{wikidata|property|preferred|references|edit|Q1533273|P348|P548=Q51930650}}
| logo_size =
| latest preview date = {{wikidata|qualifier|preferred|single|Q1533273|P348|P548=Q51930650|P577}}
| logo_alt =
| screenshot = <!-- Image name is enough -->
| caption =
| screenshot_size =
| screenshot_alt =
| collapsible =
| author =
| developer =
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| discontinued =
| latest release version = 1.26.2<ref>{{cite web |url=https://git.gnome.org/browse/gvfs/ |title=GNOME git repository of GVfs}}</ref>
| latest release date = {{Start date and age|2015|11|09}}
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| frequently updated = <!-- DO NOT include this parameter unless you know what it does -->
| status = active
| programming language =
| operating system = Linux
| operating system = Linux
| platform = GNOME
| platform = GNOME
| size =
| language =
| genre = [[Abstraction (computer science)|abstraction layer]] for the files system
| genre = [[Abstraction (computer science)|abstraction layer]] for the files system
| license =
| license = [[GNU Lesser General Public License|LGPL-2.0-or-later]]
| website = {{URL|https://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 (software)|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.
'''GVfs''' (abbreviation for '''GNOME virtual file system''') is [[GNOME]]'s userspace [[virtual filesystem]] designed to work with the I/O abstraction of [[GIO (software)|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 [[Filesystem in Userspace|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.
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.
Line 36: Line 20:
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 (<code>gvfsd</code>) that handles coordinating mounts, and then each mount is (typically) in its own daemon process (although mounts can share daemon process).
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 (<code>gvfsd</code>) 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, [[SSH file transfer protocol|SFTP]], [[File Transfer Protocol|FTP]], [[WebDAV]], [[Server Message Block|SMB]], and local data via [[Udev]] integration, [[OBject EXchange|OBEX]], [[Media Transfer Protocol|MTP]] and others.<ref>GNOME 2.22 Release Notes, [http://library.gnome.org/misc/release-notes/2.22/#sect:gvfs-gio 6.1: GVfs and GIO]</ref>
GVfs comes with a set of back-ends, including trash support, [[SSH file transfer protocol|SFTP]], [[File Transfer Protocol|FTP]], [[WebDAV]], [[Server Message Block|SMB]], and local data via [[Udev]] integration, [[OBject EXchange|OBEX]], [[Media Transfer Protocol|MTP]] and others.<ref>GNOME 2.22 Release Notes, [http://library.gnome.org/misc/release-notes/2.22/#sect:gvfs-gio 6.1: GVfs and GIO] {{Webarchive|url=https://web.archive.org/web/20080601075811/http://library.gnome.org/misc/release-notes/2.22/#sect:gvfs-gio |date=2008-06-01 }}</ref> GVfs does not seem to support the [[Files transferred over shell protocol]] (FISH).


GVfs also contains modules for [[GIO (software)|GIO]] that implement volume monitors and the GNOME URI scheme handler configuration.
GVfs also contains modules for [[GIO (software)|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.
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 <nowiki>ftp://username:password@ftp.example.net/public_html</nowiki>, but are also [[Mount (computing)|mounted]] in the traditional manner under <code>~/.gvfs/</code> or <code>/run/user/$USERNAME/gvfs</code> or <code>$XDG_RUNTIME_DIR/gvfs</code> directory<ref>[http://manned.org/gvfsd-fuse.1 "Man page: gvfsd-fuse"]</ref><ref>http://askubuntu.com/a/281756</ref> to make them available to applications using standard [[POSIX]] commands and I/O.
Attached resources are exposed via a [[URI]] syntax, for example smb://server01/gamedata or <nowiki>ftp://username:password@ftp.example.net/public_html</nowiki>, but are also [[Mount (computing)|mounted]] in the traditional manner under <code>~/.gvfs/</code> or <code>/run/user/$UID/gvfs</code> or <code>$XDG_RUNTIME_DIR/gvfs</code> directory<ref>{{cite web|url=http://manned.org/gvfsd-fuse.1|title=gvfsd-fuse.1 - manned.org|website=manned.org|access-date=18 April 2018}}</ref><ref>{{cite web|url=http://askubuntu.com/a/281756|title=Nautilus' remote folder default mount point|website=askubuntu.com|access-date=18 April 2018}}</ref> to make them available to applications using standard [[POSIX]] commands and I/O.


==Technical details==
==Technical details==
[[File:X-gvfs-show.png|thumb|The option <code>x-gvfs-show</code> for the gvfs-udisks2-volume-monitor process determines whether a mounted device is shown or not<ref name="udisks2">{{cite web |url=https://git.gnome.org/browse/gvfs/tree/monitor/udisks2/what-is-shown.txt |title=udisks2/what-is-shown.txt}}.</ref> in [[GNOME Files]]. Screenshot of [[GNOME Disks]].]]
[[File:X-gvfs-show.png|thumb|The option <code>x-gvfs-show</code> for the gvfs-udisks2-volume-monitor process determines whether a mounted device is shown or not<ref name="udisks2">{{cite web |url=https://git.gnome.org/browse/gvfs/tree/monitor/udisks2/what-is-shown.txt |title=udisks2/what-is-shown.txt|date=5 December 2012 }}.</ref> in [[GNOME Files]]. Screenshot of [[GNOME Disks]].]]
* https://developer.gnome.org/gio/stable/ch01.html#gvfs-overview


Along with generally useful APIs such as networking and D-Bus support, [[GIO (software)|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.
GVfs may use [[Filesystem in Userspace|FUSE]],<ref>[http://mail.gnome.org/archives/gtk-devel-list/2007-February/msg00062.html gvfs status report, Alexander Larsson, mail.gnome.org, February 15, 2007]</ref> and replaces the earlier [[GnomeVFS]].<ref>
[http://mail.gnome.org/archives/gtk-devel-list/2006-September/msg00072.html GnomeVFS shortcomings]</ref> It consists of two parts:<ref>[http://www.linux.com/archive/feature/130834 "Using GNOMEvfs to manipulate files"], Linux.com</ref>


The goal of GVfs has been to overcome the shortcomings of GnomeVFS<ref>{{cite web|url=http://mail.gnome.org/archives/gtk-devel-list/2006-September/msg00072.html|title=Plans for gnome-vfs replacement|website=mail.gnome.org|access-date=18 April 2018}}</ref> 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.
# a shared library which is loaded by applications supporting [[GIO (software)|GIO]]
# GVfs itself, which contains a collection of [[daemon (computing)|daemon]]s which communicate with each other and the GIO module over [[D-Bus]].


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.
A collection of command-line utilities (such as gvfs-mount, gvfs-less) works with VFS resources.<ref>[http://www.unix.com/man-page/OpenSolaris/1/gvfs-mount/ ''gvfs-mount''], [[man page]]</ref>


The actual GVfs implementation is distributed over a number of processes.
GVfs uses [[gPhoto|libgphoto2]] to expose on-camera photos to GNOME applications via a virtual filesystem.


GVfs can use [[Filesystem in Userspace|FUSE]] to mount its VFS directly onto the filesystem.<ref>{{cite web|url=http://mail.gnome.org/archives/gtk-devel-list/2007-February/msg00062.html|title=gvfs status report|website=mail.gnome.org|access-date=18 April 2018}}</ref> It consists of two parts:<ref>[http://www.linux.com/archive/feature/130834 "Using GNOMEvfs to manipulate files"], Linux.com</ref>
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.<ref name="udisks2" />


# a shared library which is loaded by applications supporting [[GIO (software)|GIO]]
The gvfs-udisks2-volume-monitor is distributed as part of the gvfs-daemons package.<ref>{{cite web |url=https://packages.debian.org/stretch/amd64/gvfs-daemons/filelist |title=filelist of gvfs-daemons package}}</ref>
# GVfs itself, which contains a collection of [[daemon (computing)|daemon]]s which communicate with each other and the GIO module over [[D-Bus]].
It is not to be confused with udisksd and udisksctl, which are part of the udisks2 package.<ref>{{cite web |url=https://packages.debian.org/stretch/amd64/udisks2/filelist |title=filelist of udisks2 package}}</ref>


A collection of command-line utilities (such as gvfs-mount, gvfs-less) works with VFS resources.<ref>{{cite web|url=http://www.unix.com/man-page/OpenSolaris/1/gvfs-mount/|title=OpenSolaris 2009.06 - man page for gvfs-mount (opensolaris section 1) - Unix & Linux Commands|website=www.unix.com|access-date=18 April 2018}}</ref>
{|class="wikitable" style="text-align: left; font-size: 80%;"

* https://developer.gnome.org/gio/stable/ch01.html#gvfs-overview

{|class="wikitable" style="text-align: left;"
|-
|-
! Daemon !! location on Debian 9 !! task
! Daemon !! task
|-
|-
! colspan=2 | Main
| gvfsd || <code>/usr/lib/gvfs/gvfsd</code> ||
|-
|-
| 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-burn || <code>/usr/lib/gvfs/gvfsd-burn</code> || Burning [[optical disk]]s
|-
|-
| gvfsd-fuse || <code>/usr/lib/gvfs/gvfsd-fuse</code> || Support for [[Filesystem in Userspace]]
| 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 (software)|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.
| gvfsd-metadata || <code>/usr/lib/gvfs/gvfsd-metadata</code> ||
|-
|-
! colspan=2 | Volume monitors
| gvfsd-trash || <code>/usr/lib/gvfs/gvfsd-trash</code> ||
|-
|-
| gvfs-goa-volume-monitor || <code>/usr/lib/gvfs/gvfs-goa-volume-monitor</code> || support for [[GNOME Online Accounts]]
| gvfs-goa-volume-monitor || support for [[GNOME Online Accounts]] (cf. [https://wiki.gnome.org/Projects/GnomeOnlineAccounts GNOME Online Accounts in the GNOME wiki])
|- style="white-space: nowrap;"
| gvfs-gphoto2-volume-monitor || support for the [[Picture Transfer Protocol]] as implemented in [[gPhoto]]
|-
|-
| gfvs-gphoto2-volume-monitor || <code>/usr/lib/gvfs/gvfs-gphoto2-volume-monitor</code> || 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.<ref name="udisks2" /> In Debian it is distributed as part of the gvfs-daemons package.<ref>{{cite web |url=https://packages.debian.org/stretch/amd64/gvfs-daemons/filelist |title=filelist of gvfs-daemons package}}</ref> It is not to be confused with udisksd and udisksctl, which are part of the udisks2 package.<ref>{{cite web |url=https://packages.debian.org/stretch/amd64/udisks2/filelist |title=filelist of udisks2 package}}</ref><br /> [[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-mtp-volume-monitor || <code>/usr/lib/gvfs/gvfs-mtp-volume-monitor</code> || support for the [[Media Transfer Protocol]]
|-
|-
| gvfs-afc-volume-monitor || support for [[Apple File Conduit]]
| gvfs-udisks2-volume-monitor || <code>/usr/lib/gvfs/gvfs-udisks2-volume-monitor</code> || [[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.
|-
|-
! colspan=2 | Mount back-ends
| gvfs-afc-volume-monitor || <code>/usr/lib/gvfs/gvfs-afc-volume-monitor</code> || support for [[Apple File Conduit]]
|-
| 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 disc]]s
|-
| 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 [[gPhoto|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 [[Network File System|NFS]] protocol
|-
| gvfsd-recent || provides recent://
|-
| gvfsd-sftp || mounts over sftp
|-
| gvfsd-smb || mounts [[Server Message Block|SMB]] (i.e. Windows Shares Filesystem) volumes
|-
| gvfsd-smb-browse || browses Windows Shares Filesystem volumes
|-
| gvfsd-trash || provides trash://
|}
|}


Line 91: Line 120:


=== Hot plugging ===
=== 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. <code>[[udev|Systemd-udevd]]</code> responds to this kind of events according to its quite comprehensive configuration. It dynamically creates and removes device nodes from the <code>[[Device_file#DEVFS|/dev]]</code> filesystem, handles hotplug events and loads drivers at boot time. In case of a storage device systemd-udevd notifies <code>udisksd</code>, and <code>gvfsd</code> and <code>gvfs-udisks2-volume-monitor</code>.<ref>{{cite web |url=http://commandline.org.uk/2014/05/28/modern_mounting_with_udisks2.html |title=Modern Mounting with Udisks2 |date=2014-05-28 |author=David Zeuthen}}</ref>
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. <code>[[systemd-udevd]]</code> receives such events and responds to them according to its quite comprehensive configuration:
* manages the special file system devfs mounted to <code>[[Device_file#DEVFS|/dev]]</code>, hence systemd-udevd dynamically creates and removes device nodes from /dev, it also loads drivers as necessary at boot time
* in case of a block device systemd-udevd notifies <code>udisksd</code>, and <code>gvfsd</code> and <code>gvfs-udisks2-volume-monitor</code>.<ref>{{cite web |url=http://commandline.org.uk/2014/05/28/modern_mounting_with_udisks2.html |title=Modern Mounting with Udisks2 |date=2014-05-28 |author=David Zeuthen}}</ref>


The udisks2 daemon <code>udisksd</code> 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 <code>udisksctl</code> utility, which can be used to trigger these operations from the command line (if permitted by PolicyKit).
The udisks2 daemon <code>udisksd</code> 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 <code>udisksctl</code> utility, which can be used to trigger these operations from the command line (if permitted by [[polkit|PolicyKit]]).

=== Packaging ===
In [[Debian]] the GVfs is [[Package management system|packaged]] into four packages: [https://packages.debian.org/stretch/amd64/gvfs/filelist gvfs], [https://packages.debian.org/stretch/amd64/gvfs-daemons/filelist gvfs-daemons], [https://packages.debian.org/stretch/amd64/gvfs-bin/filelist gvfs-bin] and [https://packages.debian.org/stretch/amd64/gvfs-backends/filelist gvfs-backends].


==See also==
==See also==
{{Portal|Free software}}
{{Portal|Free and open-source software}}
* [[GNOME Files]], the file manager for [[GNOME]] desktops, allows users to interact with GVfs filesystems
* [[Archivemount]]
* [[Thunar]], the file manager for the Xfce desktop environment, also provides filesytem abstraction using the GVfs library
* [[KIO]], a similar facility for [[KDE]] systems
* [[KIO]], a similar facility for [[KDE]] systems
* [[Archivemount]], a virtual filesystem implementation specifically for accessing [[Archive file format|archive]] files


==References==
==References==
{{Reflist}}
{{Reflist|30em}}

==External links==
* {{official website}}


{{GNOME}}
{{GNOME}}


{{DEFAULTSORT:Gvfs}}
{{DEFAULTSORT:Gvfs}}
[[Category:GNOME]]
[[Category:Applications using D-Bus]]
[[Category:Applications using D-Bus]]
[[Category:GNOME]]
[[Category:Software that uses Meson]]

Latest revision as of 17:56, 20 November 2024

GVfs
Stable release
1.56.1[1] Edit this on Wikidata / 18 October 2024
Repository
Operating systemLinux
PlatformGNOME
Typeabstraction layer for the files system
LicenseLGPL-2.0-or-later
Websitewiki.gnome.org/Projects/gvfs Edit this on Wikidata

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.

Technical details

[edit]
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.

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]

  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]

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.

Hot plugging

[edit]

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:

  • manages the special file system devfs mounted to /dev, hence systemd-udevd dynamically creates and removes device nodes from /dev, it also loads drivers as necessary at boot time
  • in case of a block 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).

Packaging

[edit]

In Debian the GVfs is packaged into four packages: gvfs, gvfs-daemons, gvfs-bin and gvfs-backends.

See also

[edit]
  • GNOME Files, the file manager for GNOME desktops, allows users to interact with GVfs filesystems
  • Thunar, the file manager for the Xfce desktop environment, also provides filesytem abstraction using the GVfs library
  • KIO, a similar facility for KDE systems
  • Archivemount, a virtual filesystem implementation specifically for accessing archive files

References

[edit]
  1. ^ "Release 1.56.1". 18 October 2024. Retrieved 21 October 2024.
  2. ^ GNOME 2.22 Release Notes, 6.1: GVfs and GIO Archived 2008-06-01 at the Wayback Machine
  3. ^ "gvfsd-fuse.1 - manned.org". manned.org. Retrieved 18 April 2018.
  4. ^ "Nautilus' remote folder default mount point". askubuntu.com. Retrieved 18 April 2018.
  5. ^ a b "udisks2/what-is-shown.txt". 5 December 2012..
  6. ^ "Plans for gnome-vfs replacement". mail.gnome.org. Retrieved 18 April 2018.
  7. ^ "gvfs status report". mail.gnome.org. Retrieved 18 April 2018.
  8. ^ "Using GNOMEvfs to manipulate files", Linux.com
  9. ^ "OpenSolaris 2009.06 - man page for gvfs-mount (opensolaris section 1) - Unix & Linux Commands". www.unix.com. Retrieved 18 April 2018.
  10. ^ "filelist of gvfs-daemons package".
  11. ^ "filelist of udisks2 package".
  12. ^ David Zeuthen (2014-05-28). "Modern Mounting with Udisks2".
[edit]