Re: [Wine]faking network shares
On Thu, Aug 12, 2004 at 12:42:08PM +0100, Fergal Daly wrote:
I have an app that wants to read from \\server\directory\file.ini and I don't have an easy way of changing this, so I want to tell wine that \\server\directory is available in /mnt/smb/server/directory. Is this possible? What do I need to do?
If you try to read from a path starting "\\.\" in Wine (in some versions), you'll get a message saying something like "Fixme: UNC name (%s) not supported.", but there is basic support for Wine to read from a file directly over an SMB link for paths that start with "\\" up until Wine-20040505. It identifies itself as a WfW server and doesn't attempt to provide a username or password, as far as I can tell. It looks like the relevant functions were deleted before 20040615. In principle, Wine could probably provide UNC-name support by calling 'smbclient', or by parsing /etc/mtab for 'smbfs' mountpoints and trying to access them like any other file. Another alternative would be a configuration-file override to alias an arbitrary UNC path as some file, just like the old [Drive X] mappings. In your case, would it be acceptable to have a local, static copy of the .ini file, and just point Wine at that somehow? (Forwarding to the developer's list, since it looks like this is a useful feature that was removed because no one was finishing it.) -- resume at http://www.cse.msu.edu/~lamber45/resume.htm PGP key at http://www.cse.msu.edu/~lamber45/newmail.htm#GPGKey
This support was removed as it really has to be done kernel-side, but as to the state of integration now you'd have to ask Alexandre or Mike I suspect. David Lee Lambert wrote:
On Thu, Aug 12, 2004 at 12:42:08PM +0100, Fergal Daly wrote:
I have an app that wants to read from \\server\directory\file.ini and I don't have an easy way of changing this, so I want to tell wine that \\server\directory is available in /mnt/smb/server/directory. Is this possible? What do I need to do?
If you try to read from a path starting "\\.\" in Wine (in some versions), you'll get a message saying something like "Fixme: UNC name (%s) not supported.", but there is basic support for Wine to read from a file directly over an SMB link for paths that start with "\\" up until Wine-20040505. It identifies itself as a WfW server and doesn't attempt to provide a username or password, as far as I can tell. It looks like the relevant functions were deleted before 20040615.
In principle, Wine could probably provide UNC-name support by calling 'smbclient', or by parsing /etc/mtab for 'smbfs' mountpoints and trying to access them like any other file. Another alternative would be a configuration-file override to alias an arbitrary UNC path as some file, just like the old [Drive X] mappings.
In your case, would it be acceptable to have a local, static copy of the .ini file, and just point Wine at that somehow?
(Forwarding to the developer's list, since it looks like this is a useful feature that was removed because no one was finishing it.)
The message I was getting was fixme:file:wine_nt_to_unix_file_name UNC name L"\\??\\UNC\\machine\path" so I had a look in the code and found the relevant place, added a few printfs and found that that \\machine\path maps to .wine/dosdevices/unc/MACHINE/PATH so it is supported, it just doesn't seem to be documented anywhere that I could find. Everything is working nicely now. I'll write a quick FAQ entry if I get time today. Thanks, F On Sun, Aug 15, 2004 at 01:16:59AM -0400, David Lee Lambert wrote:
On Thu, Aug 12, 2004 at 12:42:08PM +0100, Fergal Daly wrote:
I have an app that wants to read from \\server\directory\file.ini and I don't have an easy way of changing this, so I want to tell wine that \\server\directory is available in /mnt/smb/server/directory. Is this possible? What do I need to do?
If you try to read from a path starting "\\.\" in Wine (in some versions), you'll get a message saying something like "Fixme: UNC name (%s) not supported.", but there is basic support for Wine to read from a file directly over an SMB link for paths that start with "\\" up until Wine-20040505. It identifies itself as a WfW server and doesn't attempt to provide a username or password, as far as I can tell. It looks like the relevant functions were deleted before 20040615.
In principle, Wine could probably provide UNC-name support by calling 'smbclient', or by parsing /etc/mtab for 'smbfs' mountpoints and trying to access them like any other file. Another alternative would be a configuration-file override to alias an arbitrary UNC path as some file, just like the old [Drive X] mappings.
In your case, would it be acceptable to have a local, static copy of the .ini file, and just point Wine at that somehow?
(Forwarding to the developer's list, since it looks like this is a useful feature that was removed because no one was finishing it.)
-- resume at http://www.cse.msu.edu/~lamber45/resume.htm PGP key at http://www.cse.msu.edu/~lamber45/newmail.htm#GPGKey
Fergal Daly wrote:
The message I was getting was
fixme:file:wine_nt_to_unix_file_name UNC name L"\\??\\UNC\\machine\path"
so I had a look in the code and found the relevant place, added a few printfs and found that that
\\machine\path
maps to
.wine/dosdevices/unc/MACHINE/PATH
so it is supported, it just doesn't seem to be documented anywhere that I could find. Everything is working nicely now.
I'll write a quick FAQ entry if I get time today. Thanks,
Cool! You're right, this does appear to be totally undocumented, I had no idea about this. It should probably go into winecfg and the man pages.
Perhaps someone could add this to "The dosdevices Directory" at http://www.winehq.org/site/docs/wine-user/config-drive-main#CONFIG-DRIVE-SEC... Windows shares can are mapped into the <TT CLASS="FILENAME">unc/</TT> directory so anything trying to access <TT CLASS="FILENAME">\\machinename\some\dir\and\file</TT> will look in <TT CLASS="FILENAME">~/.wine/dosdevices/unc/machinename/some/dir/and/file</TT>. For example, if you used Samba to mount <TT CLASS="FILENAME">\\machinename\some</TT> on <TT CLASS="FILENAME">/mnt/smb/machinename/some</TT> then you can do <PRE CLASS="PROGRAMLISTING">ln -s /mnt/smb/machinename/some unc/machinename/some</PRE> to make it available in wine (don't forget to create the unc directory if it doesn't alrady exist). Fergal On Mon, Aug 16, 2004 at 01:18:45PM +0100, Mike Hearn wrote:
Fergal Daly wrote:
The message I was getting was
fixme:file:wine_nt_to_unix_file_name UNC name L"\\??\\UNC\\machine\path"
so I had a look in the code and found the relevant place, added a few printfs and found that that
\\machine\path
maps to
.wine/dosdevices/unc/MACHINE/PATH
so it is supported, it just doesn't seem to be documented anywhere that I could find. Everything is working nicely now.
I'll write a quick FAQ entry if I get time today. Thanks,
Cool! You're right, this does appear to be totally undocumented, I had no idea about this. It should probably go into winecfg and the man pages.
participants (3)
-
David Lee Lambert -
Fergal Daly -
Mike Hearn