<br><font size=2 face="Trebuchet MS">Well,</font>
<br>
<br><font size=2 face="Trebuchet MS"> I'm not sure about you want but you can do something like this in order to start shell scripts or acroread (for linux), for example:</font>
<br>
<br><font size=2 face="Trebuchet MS">a) put the keys below at the "~/.wine/system.reg":</font>
<br><font size=2 face="Trebuchet MS">----------------- 8< --------------------</font>
<br><font size=2 face="Trebuchet MS">[Software\\Classes\\.pdf] 1051470000</font>
<br><font size=2 face="Trebuchet MS">@="acroread.pdf"</font>
<br><font size=2 face="Trebuchet MS"> </font>
<br><font size=2 face="Trebuchet MS">[Software\\Classes\\acroread.pdf\\shell\\open\\command] 1051470000</font>
<br><font size=2 face="Trebuchet MS">@="\"C:\\Program Files\\Acroread\\acroread.exe\" \"%1\""</font>
<br><font size=2 face="Trebuchet MS">------------------ 8< -------------------</font>
<br>
<br>
<br><font size=2 face="Trebuchet MS">b) in the fake windows directory, pointed by "~/.wine/dosdevices/c:", put the "acroread.exe" at the "Program Files/Acroread", as described in the key-registry above. If necessary, create the "Program Files/Acroread" directory.</font>
<br><font size=2 face="Trebuchet MS">------------------ 8< -------------------</font>
<br><font size=2 face="Trebuchet MS">#!/bin/sh</font>
<br>
<br><font size=2 face="Trebuchet MS">#set -x</font>
<br><font size=2 face="Trebuchet MS">mkdir -p "$HOME/tmp"</font>
<br><font size=2 face="Trebuchet MS">LOG="$HOME/tmp/acroread.exe-log.`id -u -n`"</font>
<br><font size=2 face="Trebuchet MS">echo "Arguments received: $@" > $LOG</font>
<br>
<br><font size=2 face="Trebuchet MS">#</font>
<br><font size=2 face="Trebuchet MS"># winepath replaces "X:\path\to\application" to the Unix format</font>
<br><font size=2 face="Trebuchet MS">#</font>
<br><font size=2 face="Trebuchet MS">RESULT=`winepath "$@" 2>> $LOG`</font>
<br><font size=2 face="Trebuchet MS">echo "/usr/local/bin/acroread $RESULTADO" >> $LOG</font>
<br><font size=2 face="Trebuchet MS">TMP=$TMPDIR ; TEMP=$TMPDIR ; /usr/local/bin/acroread "$RESULT"</font>
<br>
<br><font size=2 face="Trebuchet MS">rm -f "$RESULT"</font>
<br><font size=2 face="Trebuchet MS">------------------ 8< -------------------</font>
<br>
<br><font size=2 face="Trebuchet MS"> The same logic works for all extensions you can imagine (doc, xls, sxw, ppt, zip, htm, html, ...)</font>
<br><font size=2 face="Trebuchet MS"> I mean, you can put a registry entry (at system.reg) for the extension you need and a "executable" (in fact, a shell script) to start that extension. </font>
<br><font size=2 face="Trebuchet MS"> I've done some scripts to deal with some extensions. All you have to do is to look the way the linux application works passing the proper arguments to them. For instance, "ark" forks itself so the script to deal with ZIP extension (very similar to the one above) was deleting the file before ark could read it. I had to pass "ark --nofork" in order the script to work.</font>
<br><font size=2 face="Trebuchet MS"> You can improve the scripts in order to find the application you want to start instead of acroread (xpdf, gpdf, kghostview, etc).</font>
<br>
<br><font size=2 face="Trebuchet MS">Regards.</font>
<br><font size=2 face="Trebuchet MS">---------------------------------------------------------<br>
Ulisses de Sousa Penna<br>
Analista Consultor - Banco do Brasil<br>
Fone: +55-61-310-6320 Fax: +55-61-310-6435<br>
---------------------------------------------------------</font>