Re: Starting a Linux application for a windows file in wine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dreamstogo wrote:
> 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, 
> 
> Z:/home/hilary/infocentraldata/myfiles/filename.xls.
> 
> 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.
> 
> Regards
> 
> Hilary


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:

Code:
#!/bin/sh
$1 "`wine winepath -u "$2"`"




And how to use it:

Code:
[HKEY_CLASSES_ROOT\xcelfile\Shell\Open\command]
@="/bin/sh run_prog /usr/bin/oocalc \"%1\""









[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux