Thursday, February 18, 2010

Open Word, Excel und PDF documents with wine

Normally you don't install (ms|open)-office under wine.
You rather have the full openoffice directly installed under linux.

To allow windows apps to open the files with the native openoffice applications you can do the following:

- Create a registry file containing your associations per application

For example


@="c:\\ooffice.exe %1"


@="c:\\ooffice.exe %1"


@="c:\\pdfreader.exe %1"

Then import this with regedit.exe
Now create the helper applications under C:\ of your wine installation.

For example: ooffice.exe (Make sure it is executable chmod a+x ooffice.exe)

ooffice "`winepath -u "$*"`"

or for pdf:

acroread "`winepath -u "$*"`"

What happens:

1. In the registry you tell windows what app to start for the corresponding file type
2. In the helper file ooffice.exe you start the native linux application
The helper application winpath converts a windows path into the corresponding linux path

No comments:

Post a Comment