gio mount says "volume doesn't implement mount" when run as non-root

Based on this answer for another question, the issue might be the lack of a dbus session. See:

laptop $ ssh pi
pi $ gio mount smb://192.168.86.18/Video
gio: smb://192.168.86.18/Video: volume doesn’t implement mount

After connecting to my headless Raspberry Pi over ssh, I can't mount things using gio/gvfs. Then, I can start a dbus session and run a new shell inside it:

pi $ dbus-run-session bash

pi $ gio mount smb://192.168.12.34/Foobar
…
Password required for share foobar on 192.168.12.34
…

pi $ mount | tail
…
gvfsd-fuse on /run/user/1002/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1002,group_id=1002)

pi $

As soon as that dbus session ends, the mount gets umounted.


I encountered this issue when getting a Debian 10 system up and running with the command line only at first with no desktop environment yet installed.

After installing the packages:

sudo apt install gvfs-fuse gvfs-backends libglib2.0-bin

I attempted an SMB mount with gio while logged in as my regular user (the one created by the Debian installation with uid 1000), but I got the same volume doesn't implement mount error.

I noted that the depended-upon gvfs-daemons package containing gvfsd had a configuration for a service that runs as a regular user in its package:

$ dpkg -L gvfs-daemons
...
/usr/lib/systemd/user/gvfs-daemon.service
...

To manually launch that in an already logged-in regular user session, I did:

systemctl --user start gvfs-daemon

After that the gio mount worked without issue and I was able to access the mounted volumes under /run/user/1000/gvfs/.

I haven't had to do this manually in later sessions -- it may only be necessary in a session that was already started before the package was installed.