dreamstogo
2008-May-13 13:31 UTC
[Wine] Starting a Linux application for a windows file in wine
Hello, This is my first post here, so please forgive me if a get some terms wrong! I want to be able to use Linux applications to open files from within a windows application running under wine. Here's why, I have installed Ubuntu 8.04 and wine 0.9.61 using Synaptic. I have installed a very old PIM called infocentral that was originally created by Corel and which I have been using for the last 25 years or so. It allows you to create objects and links between objects within a database that is totally flexible. One of the things you can do is to connect files to people, ie a letter that you have sent to that person. When you double click that fie, Infocentral should open the appropriate application, say word, or excel or other. Now, this being a Linux box, I don't have Microsoft office installed, so I thought I'll create registry entries to point to the OO equivalent found in the Linux directories, ie /usr/bin/oocalc etc. 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
vitamin
2008-May-13 14:12 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
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 > > HilaryYou 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\""
Dan Kegel
2008-May-13 14:28 UTC
[Wine] Starting a Linux application for a windows file in wine
On Tue, May 13, 2008 at 6:31 AM, dreamstogo <wineforum-user at winehq.org> 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.See http://wiki.winehq.org/FAQ#head-6a4666a784745253ded9de30af42cedbb4aba694 The examples are pretty weak, could somebody improve them?
vitamin
2008-May-13 15:00 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
Dan Kegel wrote:> On Tue, May 13, 2008 at 6:31 AM, dreamstogo <wineforum-user at winehq.org> 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. > > > > See http://wiki.winehq.org/FAQ#head-6a4666a784745253ded9de30af42cedbb4aba694 > > The examples are pretty weak, could somebody improve them?You can use an example from my previous post.
Dan Kegel
2008-May-13 15:39 UTC
[Wine] Starting a Linux application for a windows file in wine
On Tue, May 13, 2008 at 8:00 AM, vitamin <wineforum-user at winehq.org> wrote:> > See http://wiki.winehq.org/FAQ#head-6a4666a784745253ded9de30af42cedbb4aba694 > > > > The examples are pretty weak, could somebody improve them? > > You can use an example from my previous post.Done (as soon as I saw it). It could probably still use some work.
dreamstogo
2008-May-13 16:17 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
Thank you vitamin and Dan Kegel. Here's what I had to do to get this working from within Infocentral. I created the run_prog as per the code from vitamin. I made it executable. I added a key to [HKEY_CLASSES_ROOT\.xls] with data as "xcelfile" I added the key [HKEY_CLASSES_ROOT\xcelfile\Shell\Open\command] /usr/bin/run_prog /usr/bin/oocalc "%1" Note that the command is slightly different from that posted by vitamin. I don't know why, but it works. Now when I click on an excel file in Infocentral, oocalc opens the spreadsheet correctly. - I didn't need the /bin/sh - I did need to fully qualify the run_prog path. - I didn't need the \"%1\", I just needed "%1" This has also solved my spaces in path names issue - the "" I suppose. Now I need to create entries for .doc files etc. Thank you very much for your excellent help and speed of reply. Best wishes Hilary
vitamin
2008-May-13 23:47 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
austin987 wrote:> On Tue, May 13, 2008 at 5:16 PM, vitamin <wineforum-user at winehq.org> wrote: > > > > > DRNewcomb wrote: > > > > > While I read the FAQ on this, I didn't understand its importance. The subject is something I've been wondering about but didn't understand. If Wine is to be used for more than playing games, the users will have to be able to link between the Windows applications running under Wine and the native Linux applications. > > > > > > > > > What are you talking about? Are you implying that all windows programs some how magically will understand UNIX paths? And some how all UNIX programs will some how can use file paths inside Wine's space? > > Spit whatever you are smocking, take a deep breath and repeat your question. > > > > Jeez vitamin, chill out...I'm perfectly cool. I did not understood a single part about what was he talking about. He is welcome to spell the actual questions, problems, suggestions, etc. Making some blatant statements didn't told me anything.
dreamstogo
2008-May-14 10:21 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
Dan Kegel wrote:> > > What do people think? Is Vitamin doing more harm than good? > - DanWell, he helped me solve my original problem before the flames started, for which I thanked him. So that was good. Since then I've stayed away...
David Gerard
2008-May-14 16:30 UTC
[Wine] Fwd: Starting a Linux application for a windows file in wine
to list as well ---------- Forwarded message ---------- From: David Gerard <dgerard at gmail.com> Date: 2008/5/14 Subject: Re: [Wine] Starting a Linux application for a windows file in wine To: "Marcel W. Wysocki" <maci at satgnu.net> 2008/5/14 Marcel W. Wysocki <maci at satgnu.net>: > I can understand when he gets a bit angry from time to time, with all this people asking the same moronic questions over and over again. They're different questions when they come from different people having the same problem. > I think he is doing a good job. Show me one case where he shows a bad attitude in response to a well-written, precise and sane question. Users are not developers. Wine is getting users who don't understand how to bring up a command prompt. I don't think having someone there with the specific job of driving them away is likely to help the project. - d.
dreamstogo
2008-May-14 17:45 UTC
[Wine] Re: Starting a Linux application for a windows file in wine
My last post on this subject, I own up to be being a complete newbie concerning wine, but not on Linux or windows. I did do a search for my problem before posting but I didn't find what I was looking for. Hence my original post. Which was answered very well by vitamin. The problem with any type of search or FAQ is that you need to know what you are looking for first. You need to type the "correct" search terms in order to find what you are looking for. If you're lucky you get a hit. If you're not, you're stuck. So tolerance and good manners are the key.