Shell script for launching wineapps from a unix file manager

Kevin DeKorte kdekorte at yahoo.com
Thu Dec 5 12:06:45 CST 2002


All,

Did a little research and found this little trick that
works well.

First create this batch file and modify to your
system.

winword
------------------------------------
FNAME=`wine -- winepath -l "$1"`
wine -- "/wine/c/Program Files/Microsoft
Office/Office/WINWORD.exe" "$FNAME"
------------------------------------

chmod a+x winword and put it some where in the path
then associate any .doc to be opened with 'winword'
and it works great. I have also used this method with
excel and quicktime files.

How it works:
Line 1:
FNAME=`wine -- winepath -l "$1"   

What it does
takes a unix path like /home/uid/Docuements/file.doc
and set the variable FNAME to f:\Documents\file.doc

Line 2:
wine -- "/wine/c/Program Files/Microsoft
Office/Office/WINWORD.exe" "$FNAME"

Loads winword via wine with the wine relative path to
the file.

example:
winword /home/uid/Documents/file.doc

creates

wine -- /wine/c/Program Files/Microsoft
Office/Office/WINWORD.exe F:\Documents\file.doc

Which is what word needs to load the selected file.

Hope you find this useful.

Kevin






=====
---------------------------------
Kevin DeKorte
kdekorte at yahoo.com


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the wine-users mailing list