When browsing directories in a Windows program installed in Wine - like when opening a folder in Foobar2000 - Wine always opens the Wine explorer:
Is it possible to set Wine to open an Ubuntu file manager (e.g Nautilus) instead?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityIn Ubuntu 14.04 and 16.04 A quick review of the code in /usr/bin/winefile
indicates that the answer is no. after checking to see if it's called with a directory name it clearly is using wine to launch the file manager regardless.
Excerpt:
if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
# finally look in PATH
exec wine "$appname" "$@"
Since wine is designed to launch Windows executables It won't launch native apps. I would assume that using wine to launch the file selection routine is necessary in order to insure that the proper parameter is passed after file selection. This opinion is purely based on logic (and the content of /usr/bin/winefile). If you have information to the contrary please comment and share.
winefile
just do the translation of application name or .exe name and handles that to wine
program to do stuff with that.
The most promising approach seems to me to set MIME types for all files of interest. Have a look at How to associate all file types within Wine with its corresponding native application?
Other things I tried, but didn't work:
/usr/bin/winefile
is a simple wrapper script, you can replace or change it.
For example, to use thunar as your file manager in wine, add after the #comment lines
thunar $@
exit
You can leave the rest as it is, to be able to undo your changes.
Second approach, not working: looking in system32
for winefile.exe
and explorer.exe
, replacing them with softlinks to thunar. Wine ignores this, even a double-click on this softlinks runs winefile
instead of thunar.
It seems to me that winefile
is a builtin of wine. Maybe some registry edits could change wine's behaviour.
You can associate folders with the native file manager by saving the following as fix.reg
and importing it using Wine's regedit. Make sure to back up the registry first.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\folder\shell]
[HKEY_CLASSES_ROOT\folder\shell\open]
[HKEY_CLASSES_ROOT\folder\shell\open\command]
@="\"C:\\windows\\system32\\winebrowser.exe\" -nohome \"%1\""
[-HKEY_CLASSES_ROOT\folder\shell\open\ddeexec]
This works for me to make foobar2000 open the native file manager when using 'Open Containing Folder'
i think no. even i have use crossover with enabled "use native browser by default" it still use it's own file browser when i tried to open file from ms. word
usr/bin/winefile
. I haven't tested it though (and I suspect the FM you replace it with would need to accept the path as an argument).usr/bin/winefile
?