Mapping Samba shares in WINE using Gnome and Nautilus - Fedora Support Forums and Community
Results 1 to 1 of 1
  1. #1
    Join Date
    Oct 2007
    New Zealand. Godzone country! Heaven on earth.
    0 Post(s)
    0 Thread(s)

    Mapping Samba shares in WINE using Gnome and Nautilus

    For several years I've been trying to get our Cashbook Complete program to run in WINE, and access the data file from our SAMBA server.
    I could get the app to run in WINE, but always had to keep the data file on a local hard drive.
    This was unacceptable as more than one person needed access to the data file on a regular basis.
    All of my searching suggested that sharing a network drive should be possible.
    The only information I could find was either outdated or related to KDE.

    So the problem was "How do I get WINE to access a SAMBA share while using GNOME and NAUTILUS?"
    As with all things Linux there will be more than one way to skin this cat.
    Here is my particular solution.

    For this exercise you will
    a) need to show hidden files in Nautilus
    b) assume the username = myself
    c) assume the servername = myserver
    d) assume the sharename = myshare

    In order for you to access the SMB share you have to use Nautilus to access it first, then WINE will automagically see it.
    This method does suffer from the MS drive letter limitation - you can only MAP a maximum of 23 network drives.

    1) Do the UNC and server folders exist?
    Using Nautilus, check in /home/myself/.wine/dosdevices for the unc folder.
    If the unc folder doens't exist create it then navigate into that folder.
    Create the <servername> folder then navigate into it.
    DO NOT close Nautilus, or the tab you have just used.
    The full path in Nautilus should look something like /myself/.wine/dosdevices/unc/myserver/ and the tab should be named <servername> eg. myserver

    2) Open the SAMBA share you need to access
    Open a second tab in Nautilus and navigate to the SAMBA share you want to access in WINE. This will automatically mount the SAMBA share into the Gnome virtual file system (GVFS) and a desktop icon will appear.
    The desktop icon should be named <sharename> on <servername> eg.myshare on myserver

    3) Find the GVFS mount point
    Unfortunately, you can't right click on the desktop icon to find out where the SAMBA share has been mounted in the local file system.
    These are dynamic and only exist while you are connected to the SAMBA share.
    GVFS mounts SAMBA shares in the ~/.gvfs folder.
    Using the second tab in Nautilus change to the .gvfs folder in the users home directory.
    The full path in Nautilus should look something like /myself/.gvfs with the tab named .gvfs
    You should see a folder named <sharename> on <servername> eg.myshare on myserver in the .gvfs folder.

    4) Link the GVFS mount point to the UNC folder structure
    Here is the simplest part of the exercise. You will use winecfg to add a drive letter and path for the SAMBA share.

    You should still be in the second Nautilus tab named .gvfs looking at the folder named <sharename> on <servername> eg.myshare on myserver.
    The full path will be /home/<username>/.gvfs/<sharename> on <servername>, you will need this for winecfg.

    Run Wine Configuration from the Main Menu | Wine sub menu.
    Select the DRIVES tab.
    Click on the add button, then click OK on the drive letter pop-up dialog box.
    A new drive should show up in the Wine Configuration drive list.
    Select the new drive letter, and the PATH field will be made active.
    You will have to type in the FULL path for the SAMBA share as it is mounted in the .gvfs folder eg. /home/<username>/.gvfs/<sharename> on <servername>
    Once you have done this click on apply, but leave Wine Configuration running.
    Test the drive mapping by running your Windows program in WINE.
    You should be able to browse using the WINE file manager to access the newly mapped drive.


    If someone comes up with a way to automount the SAMBA share when WINE accesses it then I am happy for you to add to this.
    Last edited by Bert Rolston; 12th September 2010 at 12:39 PM. Reason: Correcting inaccuracies - Step 4 was wrong.

Similar Threads

  1. Replies: 2
    Last Post: 25th January 2009, 02:33 AM
  2. Nautilus (GNOME?) and Samba woes.
    By Thetargos in forum Servers & Networking
    Replies: 18
    Last Post: 9th February 2007, 06:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts