Setting working directories for applications?

Igor Tarasov tarasov.igor at gmail.com
Sun Apr 12 20:33:25 CDT 2009


2009/4/12 James McKenzie <jjmckenzie51 at earthlink.net>:
> The problem is that you are technically working in Windows and the
> working directory may need to be set in the registry.

Why? And where? Working directory in cases I've seen is specified in .lnk file.

Wikipedia: "Generally the effect of double-clicking a shortcut is
intended to be the same as double-clicking the application to which it
refers, but Windows shortcuts contain separate properties for the
target file and the "Start In" directory. If the latter parameter is
not entered, attempting to use the shortcut may generate "missing DLL"
errors not present when the application is accessed directly"

> Please look at this in a working Windows configuration.

I don't have windows box at hand, but I'll check that as soon as I can.

In my opinion, there are two ways to solve this:

1) depend on DE, creating .desktop or alias or whatever, and hope that
it would work. And we know that at least in XFCE it won't, and since
Path parameter is optional in freedesktop specification, there might
be more DEs where we'll have this problem.

2) create some kind of internal functionality so that wine could
reproduce .lnk behavior without need in relying on DE.

For instance, wine could associate itself with .lnk files (don't know
why, but I don't like this idea).

Or we could save all lnk files somewhere and have some tiny command
like wine /path/to/link.lnk that would read all options from .lnk file
and change working dir/do whatever required and launch the
application.

Currently wine can't launch .lnk files.

Another way to do this is to add optional parameter to wine, say
"--workdir", and wine would convert lnk to .desktop, but save StartIn
parameter not in Path, but in command line:

wine --workdir /work/dir /path/to/exe

-- 
Igor



More information about the wine-devel mailing list