Shell script for launching wineapps from a unix file manager

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


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

First create this batch file and modify to your

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.

winword /home/uid/Documents/file.doc


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 DeKorte
kdekorte at

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.

More information about the wine-users mailing list