How do I navigate to a samba location I've mounted in Nautilus on the command line?

9

6

This is the same question here (and a bit of here too), except that I'm running Debian wheezy (7.4). To clear up, these directories do not exist:

/run/user
/var/run/user
~/.cache/gvfs

And this directory is empty:

~/.gvfs/

And the GVFS mounted samba share directory is not found in:

/media/
/mnt/

Naturally, I'd be expecting the Nautilus explorer to help describe the path I'm looking at, mounted locally. Or "Open in Terminal" to work. But they foil me!


Some of the GVFS utilities show some info from the command line:

$ gvfs-mount -l
...
Mount(0): sharedir on wincomp -> smb://wincomp/sharedir/
  Type: GDaemonMount

or with gvfs-mount -li:

Mount(0): sharedir on wincomp -> smb://wincomp/sharedir/
  Type: GDaemonMount
  default_location=smb://wincomp/sharedir/
  themed icons:  [folder-remote]  [folder]
  can_unmount=1
  can_eject=0
  is_shadowed=0

But it doesn't specify where the local mount location is!

Mike T

Posted 2014-02-17T09:42:45.740

Reputation: 664

Have you checked if ~/.gvfs directory exists? – Alessandro Dotti Contra – 2014-02-17T17:26:15.577

@adc yes it exists, but is empty – Mike T – 2014-02-17T18:16:38.093

Usually those are mounted somewhere beneath /media. You can check this with gvfs-mount. – bjanssen – 2014-02-22T21:53:26.403

@bjanssen gvfs-mount -l shows the mount exists, but doesn't say where. And it isn't under /media. – Mike T – 2014-02-22T23:07:07.157

Answers

9

Ok, figured it out. The default installation of Debian Wheezy does not install the POSIX compatibility layer for GVFS. Install it:

apt-get install gvfs-fuse

Add your user to the FUSE group:

adduser <username> fuse

Reboot your machine (or switch runlevels) and now GVFS will export a FUSE-fs to /home/<username>/.gvfs/<resourcename>

Best regards.

See https://wiki.gnome.org/Projects/gvfs/doc for more information, esp. the part about the FUSE daemon.

bjanssen

Posted 2014-02-17T09:42:45.740

Reputation: 2 289

1Looks like the fuse group doesn't exist on Jessie, even after installing gvfs-fuse. – Adambean – 2016-12-27T12:35:00.607

Brilliant! Even the "Open in Terminal" feature now works too! – Mike T – 2014-02-23T17:47:02.360

8

To add to bjanssen's answer, in Debian jessie the SMB share is available at

/run/user/$UID/gvfs

The same applies to your SFTP or WEBDAV shares.

Fred Schoen

Posted 2014-02-17T09:42:45.740

Reputation: 222

2

If you dont know where samba is mounted try to use "mount" command. You should see sth like:

//123.123.123.8/s /mnt/user/sambaShare smbfs  0 0

If you want samba share to be mount in particular directory add to "fstab"

//123.123.123.8/s  /mnt/user/sambaShare  smb  username=admin,password=pass 0 0

ahaw

Posted 2014-02-17T09:42:45.740

Reputation: 330

mount doesn't list it, but gvfs-mount shows some info for the mount. – Mike T – 2014-02-22T23:08:50.427

This answer should be correct, unless you are somehow not fully permissioned to see the mount, or it has not actually mounted correctly. Are you running all actions ~as~ root, or through sudo? – George Spiceland – 2014-02-23T05:48:41.910

@GeorgeSpiceland mounted as a normal user in Nautilus (via GVFS), and works with Nautilus browser, but apparently hidden/useless to all others, including root. – Mike T – 2014-02-23T08:08:07.943

@George Spiceland: gvfs is FUSE-based. Only the user mounting the share will see the appropriate gvfs information. I'm looking into this issue (just need to spin up a Debian Wheezy VM), because my curiosity has been spiked. Last time I had to deal with this stuff, gvfs-mount would show entries like gvfs-mount-daemon on /foo/bar etc. Apparently this has changed since Squeeze. – bjanssen – 2014-02-23T10:46:18.217

My weakness with Debian based distro's shines through, thanks for the clarification guys, I may look into this myself. – George Spiceland – 2014-02-23T17:11:01.420