penna@bb.com.br
2005-May-05 19:17 UTC
Starting Linux apps from Windows app (was: Re: [Wine]wine & mime types)
Hi Rainer,> i have running lotus notes under wine on my redhat 9 system.So am I, since year 2001 ;)> what i want is, to define which application should be started for > which attachment type. so for microsoft attachments i want to start > my linux version of open office and for pdf files i want also to start > my linux version of acrobat reader or xpdf! > > so, where do i have to configure this stuff? >OK, It's possible and works very fine when you right-click at the document. See below. I did the following 2 steps: 1) put an entry at the ~/.wine/system.reg like this (example): ------------------------ 8< -------------------------------- [Software\\Classes\\.pdf] 1051470000 @="acroread.pdf" [Software\\Classes\\acroread.pdf] 1051470000 @="Documento Adobe PDF" [Software\\Classes\\acroread.pdf\\DefaultIcon] 1051470000 @="C:\\Program Files\\Acroread\\acroread.exe,1" [Software\\Classes\\acroread.pdf\\shell] 1051470000 @="open" [Software\\Classes\\acroread.pdf\\shell\\open\\command] 1051470000 @="\"C:\\Program Files\\Acroread\\acroread.exe\" \"%1\"" ---------------------- 8< --------------------------------- 2) the linux "executable" acroread.exe *must have8 be placed at the above dir (the linux "executable" is a shell script so you can do anything you like from now on ;)). Follows an example: ---------------------- 8< --------------------------------- #!/bin/sh #set -x mkdir -p "$HOME/tmp" LOG="$HOME/tmp/acroread.exe-log.`id -u -n`" echo "Arguments received: $@" > $LOG # RESULT=`winepath "$@" 2> /dev/null` echo "/usr/local/bin/acroread $RESULT" >> $LOG TMP=$TMPDIR ; TEMP=$TMPDIR ; /usr/local/bin/acroread "$RESULT" # removing the temporary file rm -f "$RESULT" ---------------------- 8< --------------------------------- I already have system.reg entries for various extensions (DOC, SXW, XLS, SXC, ZIP, HTM, JPG, etc) and their respectives "executables". You have to be careful with some tricks like the $TMP and $TMPDIR that are modified by wine. You can have lots of informations if you put at the end of the "executable" script an entry like: "env >> $LOG" to see the environment variables and anything you like. If this helps I'd like to know because we can exchange new "executables" for other extensios (mimes)/entries. One more tip for lotus notes. You can also modify your browser settings in order to start a linux browser when you get a HTTP link at the email. My notes is in portuguese (brazilian) so I'm figuring out the path/location of the parameters in english .... you have to choose (at the right side at the end of the notes window) something like: Office->Edit current->Internet browser. At the "internet browser" choose "Other" and then navigate through the file system in order to find the "mozilla.exe" shell script below (put it somewhere else). There is no need for a system.reg entry. mozilla.exe ---------------------- 8< --------------------------------- #!/bin/sh #set -x mkdir -p "$HOME/tmp" LOG="$HOME/tmp/mozilla.exe-log.`id -u -n`" echo "Arguments received: $@" > $LOG MOZILLA_BIN="/usr/bin/mozilla" LANG=en $MOZILLA_BIN -remote "ping()" 2>&1 | grep "No running" >> $LOG 2>&1 if [ $? != 0 ] ; then echo "Calling: $MOZILLA_BIN -remote \"openurl(\"$RESULTADO\", new-window)\"" >> $LOG $MOZILLA_BIN -remote "openurl($RESULTADO, new-window)" else echo "Calling: $MOZILLA_BIN \"$RESULTADO\"" >> $LOG $MOZILLA_BIN "$RESULTADO" fi ---------------------- 8< --------------------------------- I have a more sofisticated script. If you want, please let me know. Hope this helps. Regards. --------------------------------------------------------- Ulisses de Sousa Penna Analista Consultor - Banco do Brasil Fone: +55-61-310-6320 Fax: +55-61-310-6435 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20050505/49bb73aa/attachment.htm
Rainer Hochreiter
2005-May-09 05:52 UTC
[Wine]Re: Starting Linux apps from Windows app (was: Re: wine & mime types)
On Thu, 05 May 2005 21:17:31 -0300, penna wrote: hi penna, (hope this is correct)> OK, It's possible and works very fine when you right-click at the > document. See below. > > I did the following 2 steps: >i followed your instructions regarding pdf and everything works fine! great hint - thanks a lot!> I already have system.reg entries for various extensions (DOC, > SXW, XLS, SXC, ZIP, HTM, JPG, etc) and their respectives "executables". > You have to be careful with some tricks like the $TMP and $TMPDIR > that are modified by wine.i am very interested in such entries to - especially in office-like entries, which allow me to use open-office for m$ attachments! one technical question: what are these "magic" numbers behind the registry keys?> You can have lots of informations if you put at the end of the > "executable" script an entry like: "env >> $LOG" to see the environment > variables and anything you like. > If this helps I'd like to know because we can exchange new > "executables" for other extensios (mimes)/entries. > One more tip for lotus notes. You can also modify your browser > settings in order to start a linux browser when you get a HTTP link at > the email. My notes is in portuguese (brazilian) so I'm figuring out the > path/location of the parameters in english .... you have to choose (at > the right side at the end of the notes window) something like: > Office->Edit current->Internet browser. At the "internet browser" choose > "Other" and then navigate through the file system in order to find the > "mozilla.exe" shell script below (put it somewhere else). There is no > need for a system.reg entry.thanks for the mozilla tip also, but i have already configured to use firefox as internet browser!> > I have a more sofisticated script. If you want, please let me > know.what kind of script do you mean? a more mozilla sophisticated script? -- Rainer Hochreiter Email: rainer@hochreiter.at
Reasonably Related Threads
- Linux apps from inside Wine (was:Re: Problems with Lotus Notes R5.0.12 under Wine 20050524)
- Linux apps from inside Wine (was:Re: Problems with Lotus Notes R5.0.12 under Wine 20050524)
- Problems with Lotus Notes R5.0.12 under Wine 20050524
- Linux apps from inside Wine (was:Re: Problems with Lotus Notes R5.0.12 under Wine 20050524)
- start a linux command using a win32 apps ?