Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed MS Office 2010 using PlayOnLinux. i want to associate the .docx files to Playonlinux. Could you please tell me how to do that? Playonlinux does not show up in "Open With" options. I am using UBuntu 12.04 Beta. There is no place that I can find, where I can add a custom command.

share|improve this question
up vote 8 down vote accepted

Update: PlayOnLinux have finally added this feature so you do not need to do this manually any more! But you still have to add "$(echo "$@" | sed -e 's:/*/:\\:g')" in the end.

First make sure you are showing hidden files by open homefolder. Click on edit then preferences and tick the bar. Close the window. Then you type the command

sudo nautilus

Type in your password. Then you will need click yourself to top of disk. Then go to usr/share/applications. There try to find the word icon. If you dont finde it then copy the icon from the desktop and paste it in the folder. Right click on the icon you just pasted and click on properties. Change the "command" to

playonlinux --run "Microsoft Word 2010" z:%f

(Make sure to teave the " in) For Powerpoint you just change "Word" to "Powerpoint" And if you are running office 2007 you just change "2011" to "2007" Do this with all the icons you want to set file associations for. Then close the Window.

If you have the updated program start from here:

Then open home folder. Click on .playonlinux/shortcuts There you will find different files named exel powerpoint and word. Open one with notepad. The file should look something like this:

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
export WINEPREFIX="/home/leo/.PlayOnLinux//wineprefix/Office2010"
export WINEDEBUG="-all"
#POL_Log=Microsoft Office 2010_1336312516
cd "/home/leo/.PlayOnLinux//wineprefix/Office2010/drive_c/./Program Files/Microsoft Office/Office14"
POL_Wine "EXCEL.EXE"  $@

In the end change $@ to

"$(echo "$@" | sed -e 's:/*/:\\:g')"

(leave " in!!) You have to do this with every application you want to set associations to.

Now go to the file you want to open click open with and other applications then show other applications and you should see word and powerpoint. Click on it and is should start. You have to repeat this with all the apps you want to set associations to. Hope it will work!

Update: PlayOnLinux have finally added this feature so you do not need to do this manually any more! But you still have to add "$(echo "$@" | sed -e 's:/*/:\\:g')" in the end.

share|improve this answer
excellent! it works like a charm. I will add this how to to my blog! :) – Ubuntuser Jun 10 '12 at 22:04
Glad it helped! It took me for ever to figure it out... – Leo Mar 3 '13 at 14:16

The Easiest solution:

Open the nautilus or other file browser, Click with the right bottom of mouse on a doc(x) file, properties, Open With, Add Application, Use a custom command, and use:

playonlinux --run "Microsoft Word 2007" '"z:%f"'

Do the same for other filetypes as Excel, Powerpoint, and others..

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.