Setting working directories for applications?

James McKenzie jjmckenzie51 at
Sun Apr 12 13:39:35 CDT 2009

Igor Tarasov wrote:
> Hi Jeff
>> There is Wine's start.exe which takes a /Unix option to start the
>> supplied file in unix path form, which both sets the working directory
>> and provides the commandline double quoting quirk which Windows
>> Explorer does.  So, instead of cd ~/.wine/drive_c/foo && wine bar.exe,
>> you can wine start /Unix ~/.wine/drive_c/foo/bar.exe
> Well, I've already have looked into start.exe, and it does not provide
> functionality I need.
> Look: we have some program, prog.exe It is located it
> ~/.wine/drive_c/foo/ . But it needs it's working dir to be set to
> ~/.wine/drive_c/foo/bar. So, from terminal you can launch it this way:
> cd ~/.wine/drive_c/foo/bar
> wine ../prog.exe
> Start.exe won't help here, as I don't see any path-related options there.
> When installing such application, wine woul convert .lnk into .desktop
> that look like this (irrelevant options skipped):
> [Desktop Entry]
> Name=Da Prog
> Exec[$e]=env WINEPREFIX="/home/user/.wine-wt" wine "C:\\foo\\prog.exe"
> Path[$e]=$HOME/.wine/dosdevices/c:/foo/bar
> XFCE ignores Path attribute, and prog.exe won't launch or would
> complain it can't find some files and needs to be reinstalled.
> Mac also have some problems with this.
> BTW, according to freedesktop specification Path attribute is optional.
The problem is that you are technically working in Windows and the
working directory may need to be set in the registry.  Please look at
this in a working Windows configuration.  I have found in these cases
that using regedit and duplicating the setup does tend to work.

And the fact that you are using a Mac does not have anything to do with
this situation, it is a 'broken' feature of Windows that Wine has to
reproduce properly.

James McKenzie

More information about the wine-devel mailing list