[Wine] Re: Starting a Linux application for a windows file in wine
wineforum-user at winehq.org
Tue May 13 09:12:00 CDT 2008
> I created and entry for .xls in HKEY_CLASSES_ROOT with the Data of Spreadsheet. I then created a key called Spreadsheet, subkey shell, subkey open with the command /usr/bin/oocalc %1.
> This works up to a point,
> - when I click on a file in Infocentral (running under wine), oocalc now attempts to open and tries to open the file. The problem is that the name of the file is not passed to OO correctly, the %1 parameter should pass the names of the file to OO, it does but it is corrupted. it shows as,
> OO shows an error message and then stops.
> Obviously for Linux the Z:/ at the front is causing some trouble (I think). I also note that if there are spaces in the names of the directories or files this causes a problem, but this I can fix.
> - if I leave off the %1 parameter from the registry open command, oocalc opens with no problem but into a blank file.
> Any help on this would be greatly appreciated.
You need a small shell script that remaps windows path into unix path. Wine has a special program for that - 'winepath'.
Here is an example of how this script might look like run_prog:
$1 "`wine winepath -u "$2"`"
And how to use it:
@="/bin/sh run_prog /usr/bin/oocalc \"%1\""
More information about the wine-users