Using Ubuntu "Connect to Server" to mount Windows share?

13,045

Ubuntu's Gnome desktop uses GVFS to mount those shares.

You should be able to use the following command to mount your shares. If you have a persistent home directory, you can add this or similar to some startup files.

gvfs-mount smb://server-name/share-name

The mount should be available under your home directory, in /home/username/.gvfs. For example, on my system I did the following:

$ gvfs-mount smb://my-home-server/my-share
$ ls -F ~/.gvfs
my-share on my-home-server/

So that share is directly accessible (on commandline and in the desktop environment) via the mountpoint /home/username/.gvfs/my-share on my-home-server.

According to several sources, if you are using this over SSH or another situation where you aren't running the full Gnome setup, you may need to use dbus-launch to mount the share:

dbus-launch gvfs-mount smb://server-name/share-name

(source1, source2)

Share:
13,045
Linosch Artox
Author by

Linosch Artox

Updated on September 17, 2022

Comments

  • Linosch Artox
    Linosch Artox over 1 year

    I have a system with Ubuntu 9.10 installed.

    I can connect to remote windows shares by using the "connect to server" under "places" menu.

    I can't figure out where these mount in the file system. Is it possible to mount it in the file system.

    And I can't install smbfs or anything else. I need to use only what comes on the live CD, as there is no internet connection and no way to get in packages.

  • quack quixote
    quack quixote about 14 years
    if you want it mounted somewhere else, i believe this is possible, but you may have to modify a config file somewhere. alternately you can create a symlink to ~/.gvfs for easy access.
  • bjoernz
    bjoernz about 13 years
    I want to confirm that you need dbus-launch over ssh. Also the complete syntax for the Windows share should look like this: smb://DOMAIN\;username@server-name/share-name