File: tramp-gvfs.el.html

Access functions for the GVFS daemon from Tramp. Tested with GVFS
1.0 (Ubuntu 8.10, Gnome 2.24). It has been reported also to run
with GVFS 0.2.5 (Ubuntu 8.04, Gnome 2.22), but there is an incompatibility with the mount_info structure, which has been worked around.

It has also been tested with GVFS 1.6 (Ubuntu 10.04, Gnome 2.30), where the default_location has been added to mount_info (see
<https://bugzilla.gnome.org/show_bug.cgi?id=561998>.

With GVFS 1.14 (Ubuntu 12.10, Gnome 3.6) the interfaces have been changed, again. So we must introspect the D-Bus interfaces.

All actions to mount a remote location, and to retrieve mount information, are performed by D-Bus messages. File operations themselves are performed via the mounted filesystem in ~/.gvfs. Consequently, GNU Emacs with enabled D-Bus bindings is a precondition.

The GVFS D-Bus interface is said to be unstable. There were even no introspection data before GVFS 1.14. The interface, as discovered during development time, is given in respective comments.

The user option tramp-gvfs-methods contains the list of supported connection methods. Per default, these are "afp", "dav", "davs",
"gdrive", "mtp", "nextcloud" and "sftp".

"gdrive" and "nextcloud" connection methods require a respective
account in GNOME Online Accounts, with enabled "Files" service.

The "mtp" connection method is responsible for media devices, like cell phones, tablets, cameras etc. The device must already be connected via USB, before accessing it.

Other possible connection methods are "ftp", "http", "https" and
"smb". When one of these methods is added to the list, the remote
access for that method is performed via GVFS instead of the native Tramp implementation. However, this is not recommended. These methods are listed here for the benefit of file archives, see tramp-archive.el.

GVFS offers even more connection methods. The complete list of connection methods of the actual GVFS implementation can be retrieved by:

(message
 "%s"
 (mapcar
  #'car
  (dbus-call-method
   :session tramp-gvfs-service-daemon tramp-gvfs-path-mounttracker
   tramp-gvfs-interface-mounttracker "ListMountableInfo")))

See also /usr/share/gvfs/mounts

Note that all other connection methods are not tested, beside the ones offered for customization in tramp-gvfs-methods. If you request an additional connection method to be supported, please drop me a note.

For hostname completion, information is retrieved from the zeroconf daemon (for the "afp", "dav", "davs", and "sftp" methods). The zeroconf daemon is pre-configured to discover services in the
"local" domain. If another domain should be used for discovering
services, the user option tramp-gvfs-zeroconf-domain can be set accordingly.

Restrictions:

* Two shares of the same SMB server cannot be mounted in parallel.

Defined variables (50)

tramp-goa-identity-regexpRegexp matching GNOME Online Accounts "PresentationIdentity" property.
tramp-goa-interface-accountThe account interface of the GNOME Online Accounts.
tramp-goa-interface-calendarThe calendar interface of the GNOME Online Accounts.
tramp-goa-interface-chatThe chat interface of the GNOME Online Accounts.
tramp-goa-interface-contactsThe contacts interface of the GNOME Online Accounts.
tramp-goa-interface-documentsThe manager interface of the GNOME Online Accounts.
tramp-goa-interface-filesThe files interface of the GNOME Online Accounts.
tramp-goa-interface-mailThe mail interface of the GNOME Online Accounts.
tramp-goa-interface-oauth2basedThe oauth2based interface of the GNOME Online Accounts.
tramp-goa-interface-photosThe photos interface of the GNOME Online Accounts.
tramp-goa-interface-printersThe printers interface of the GNOME Online Accounts.
tramp-goa-methodsList of methods which require registration at GNOME Online Accounts.
tramp-goa-pathThe object path of the GNOME Online Accounts.
tramp-goa-path-accountsThe object path of the GNOME Online Accounts accounts.
tramp-goa-path-managerThe object path of the GNOME Online Accounts manager.
tramp-goa-serviceThe well known name of the GNOME Online Accounts service.
tramp-gvfs-dbus-event-vectorCurrent Tramp file name to be used, as vector.
tramp-gvfs-enabledNon-nil when GVFS is available.
tramp-gvfs-file-attributesGVFS file attributes.
tramp-gvfs-file-attributes-with-gvfs-info-regexpRegexp to parse GVFS file attributes with ‘gvfs-info’.
tramp-gvfs-file-attributes-with-gvfs-ls-regexpRegexp to parse GVFS file attributes with ‘gvfs-ls’.
tramp-gvfs-file-name-handler-alistAlist of handler functions for Tramp GVFS method.
tramp-gvfs-file-system-attributesGVFS file system attributes.
tramp-gvfs-file-system-attributes-regexpRegexp to parse GVFS file system attributes with ‘gvfs-info’.
tramp-gvfs-gio-mappingList of cons cells, mapping "gvfs-<command>" to "gio <command>".
tramp-gvfs-interface-mountoperationUsed by the dbus-proxying implementation of GMountOperation.
tramp-gvfs-interface-mounttrackerThe mount tracking interface in the GVFS daemon.
tramp-gvfs-interface-remotevolumemonitorThe volume monitor interface.
tramp-gvfs-listmountsThe name of the "listMounts" method.
tramp-gvfs-methodsList of methods for remote files, accessed with GVFS.
tramp-gvfs-methods-mounttrackerThe list of supported methods of the mount tracking interface.
tramp-gvfs-mountlocationThe name of the "mountLocation" method.
tramp-gvfs-mountlocation-signatureThe D-Bus signature of the "mountLocation" method.
tramp-gvfs-nextcloud-default-prefixDefault prefix for owncloud / nextcloud methods.
tramp-gvfs-nextcloud-default-prefix-regexpRegexp of default prefix for owncloud / nextcloud methods.
tramp-gvfs-password-anonymous-supportedOperation supports anonymous users.
tramp-gvfs-password-need-domainOperation requires a domain.
tramp-gvfs-password-need-passwordOperation requires a password.
tramp-gvfs-password-need-usernameOperation requires a username.
tramp-gvfs-password-saving-supportedOperation supports saving settings.
tramp-gvfs-path-mounttrackerThe object path of the GVFS daemon.
tramp-gvfs-path-remotevolumemonitorThe object path of the remote volume monitor.
tramp-gvfs-path-trampThe preceding object path for own objects.
tramp-gvfs-service-afc-volumemonitorThe well known name of the AFC volume monitor.
tramp-gvfs-service-daemonThe well known name of the GVFS daemon.
tramp-gvfs-service-goa-volumemonitorThe well known name of the GOA volume monitor.
tramp-gvfs-service-gphoto2-volumemonitorThe well known name of the GPhoto2 volume monitor.
tramp-gvfs-service-mtp-volumemonitorThe well known name of the MTP volume monitor.
tramp-gvfs-zeroconf-domainZeroconf domain to be used for discovering services, like host names.
tramp-media-methodsList of GVFS methods which are covered by the "mtp" method.

Defined functions (81)

copy-tramp-goa-account(ARG)
copy-tramp-media-device(ARG)
make-tramp-goa-account
make-tramp-goa-account--cmacro
make-tramp-media-device
make-tramp-media-device--cmacro
tramp-dbus-function(VEC FUNC ARGS)
tramp-get-goa-account(VEC)
tramp-get-goa-accounts(VEC)
tramp-get-media-device(VEC)
tramp-get-media-devices(VEC)
tramp-goa-account-host(CL-X)
tramp-goa-account-host--cmacro(CL-WHOLE-ARG CL-X)
tramp-goa-account-method(CL-X)
tramp-goa-account-method--cmacro(CL-WHOLE-ARG CL-X)
tramp-goa-account-p(CL-X)
tramp-goa-account-p--cmacro(CL-WHOLE-ARG CL-X)
tramp-goa-account-port(CL-X)
tramp-goa-account-port--cmacro(CL-WHOLE-ARG CL-X)
tramp-goa-account-user(CL-X)
tramp-goa-account-user--cmacro(CL-WHOLE-ARG CL-X)
tramp-gvfs-activation-uri(FILENAME)
tramp-gvfs-connection-mounted-p(VEC)
tramp-gvfs-dbus-byte-array-to-string(BYTE-ARRAY)
tramp-gvfs-dbus-event-error(EVENT ERR)
tramp-gvfs-dbus-string-to-byte-array(STRING)
tramp-gvfs-do-copy-or-rename-file(OP FILENAME NEWNAME &optional OK-IF-ALREADY-EXISTS KEEP-DATE PRESERVE-UID-GID PRESERVE-EXTENDED-ATTRIBUTES)
tramp-gvfs-file-name(OBJECT-PATH)
tramp-gvfs-file-name-handler(OPERATION &rest ARGS)
tramp-gvfs-file-name-p(FILENAME)
tramp-gvfs-get-directory-attributes(DIRECTORY)
tramp-gvfs-get-file-attributes(FILENAME)
tramp-gvfs-get-remote-prefix(VEC)
tramp-gvfs-get-root-attributes(FILENAME &optional FILE-SYSTEM)
tramp-gvfs-gio-tool-p(VEC)
tramp-gvfs-handle-copy-file(FILENAME NEWNAME &optional OK-IF-ALREADY-EXISTS KEEP-DATE PRESERVE-UID-GID PRESERVE-EXTENDED-ATTRIBUTES)
tramp-gvfs-handle-delete-directory(DIRECTORY &optional RECURSIVE TRASH)
tramp-gvfs-handle-delete-file(FILENAME &optional TRASH)
tramp-gvfs-handle-expand-file-name(NAME &optional DIR)
tramp-gvfs-handle-file-attributes(FILENAME &optional ID-FORMAT)
tramp-gvfs-handle-file-executable-p(FILENAME)
tramp-gvfs-handle-file-name-all-completions(FILENAME DIRECTORY)
tramp-gvfs-handle-file-notify-add-watch(FILE-NAME FLAGS CALLBACK)
tramp-gvfs-handle-file-system-info(FILENAME)
tramp-gvfs-handle-get-remote-gid(VEC ID-FORMAT)
tramp-gvfs-handle-get-remote-uid(VEC ID-FORMAT)
tramp-gvfs-handle-make-directory(DIR &optional PARENTS)
tramp-gvfs-handle-rename-file(FILENAME NEWNAME &optional OK-IF-ALREADY-EXISTS)
tramp-gvfs-handle-set-file-modes(FILENAME MODE &optional FLAG)
tramp-gvfs-handle-set-file-times(FILENAME &optional TIME FLAG)
tramp-gvfs-handle-set-file-uid-gid(FILENAME &optional UID GID)
tramp-gvfs-handler-askpassword(MESSAGE USER DOMAIN FLAGS)
tramp-gvfs-handler-askquestion(MESSAGE CHOICES)
tramp-gvfs-handler-mounted-unmounted(MOUNT-INFO)
tramp-gvfs-handler-volumeadded-volumeremoved(DBUS-NAME ID VOLUME)
tramp-gvfs-maybe-open-connection(VEC)
tramp-gvfs-monitor-process-filter(PROC STRING)
tramp-gvfs-mount-spec(VEC)
tramp-gvfs-mount-spec-entry(KEY VALUE)
tramp-gvfs-object-path(FILENAME)
tramp-gvfs-parse-device-names(SERVICE)
tramp-gvfs-send-command(VEC COMMAND &rest ARGS)
tramp-gvfs-service-volumemonitor(METHOD)
tramp-gvfs-set-attribute(VEC &rest ARGS)
tramp-gvfs-stringify-dbus-message(MESSAGE)
tramp-gvfs-unmount(VEC)
tramp-gvfs-url-file-name(FILENAME)
tramp-gvfs-url-host(URL)
tramp-media-device-host(CL-X)
tramp-media-device-host--cmacro(CL-WHOLE-ARG CL-X)
tramp-media-device-method(CL-X)
tramp-media-device-method--cmacro(CL-WHOLE-ARG CL-X)
tramp-media-device-p(CL-X)
tramp-media-device-p--cmacro(CL-WHOLE-ARG CL-X)
tramp-media-device-port(CL-X)
tramp-media-device-port--cmacro(CL-WHOLE-ARG CL-X)
tramp-parse-goa-accounts(SERVICE)
tramp-parse-media-names(SERVICE)
tramp-zeroconf-parse-device-names(SERVICE)
with-tramp-dbus-call-method(VEC SYNCHRONOUS BUS SERVICE PATH INTERFACE METHOD &rest ARGS)
with-tramp-dbus-get-all-properties(VEC BUS SERVICE PATH INTERFACE)

Defined faces (0)