Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12th September 2010, 07:36 AM
Bert Rolston Offline
Registered User
 
Join Date: Oct 2007
Location: New Zealand. Godzone country! Heaven on earth.
Posts: 89
linuxfedorafirefox
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.

ASSUMPTIONS
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

LIMITATIONS
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.


PROCEDURE
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.
DONE!



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 01:39 PM. Reason: Correcting inaccuracies - Step 4 was wrong.
Reply With Quote
Reply

Tags
gnome, gvfs, map, network, wine

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nautilus can not access samba shares when network card uses static IP address coldspring Servers & Networking 2 25th January 2009 02:33 AM
Nautilus (GNOME?) and Samba woes. Thetargos Servers & Networking 18 9th February 2007 06:44 PM


Current GMT-time: 00:09 (Wednesday, 26-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Planaltina Travel Photos - Brooklyn Center Photos on Instagram - Abohar