Allow 'wine foo.exe' to work when foo.exe is a symlink

Jesse Allen the3dfxdude at gmail.com
Mon Jun 19 00:20:44 CDT 2006


On 6/18/06, Dan Kegel <dank at kegel.com> wrote:
> Currently, when I install a Windows app on Ubuntu,
> the apps don't show up in the system menus.
> I'm doing a demo of Wine for a users' group in a few
> days, so I thought "How would the average user deal with this?"
> Probably they'd navigate down to the directory
> where the app was installed, make a shortcut to the app,
> and drag the shortcut to the desktop.  So I tried
> that -- and it didn't work.  But it does work if I apply
> the following trivial patch, which just uses readlink() to find the
> target of the shortcut.    I didn't really analyze the
> code, just slammed the readlink in there, and was happy to
> see it worked.
>
> Changelog:
>   kernel/process.c:  if argv[1] is a symlink, use its target
>
>  process.c |   14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
>

>From my own playing around with the issue, I believe I understand why
you are making this change for shortcuts.

I do have to state, that with this change, it will break the method
using symlinks to pass the exe check on blizzard games logging into
battle.net. It will also break my workaround for an app that expands
its program path funny (symlinking again). However, you can still use
a hard link to do the same thing so there's nothing wrong with this
change happening. Now I have to go tell everyone to use a hard link
instead. :)



More information about the wine-patches mailing list