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'm trying to associate .doc and .docx files to MS Word 2010 using the same .desktop file as Unity dash and launcher, so I can use the Word icon in launcher.

I tried:

[Desktop Entry]
Name=Microsoft Word 2010
Exec=env WINEPREFIX="/home/nastys/.mso2010" wine "C:/Program Files/Microsoft Office/Office14/WINWORD.exe" %f
Comment=Create and edit professional-looking documents such as letters, papers, reports, and booklets by using Microsoft Word.
MimeType=application/msword; application/vnd.openxmlformats-officedocument.wordprocessingml.document;

Using this .desktop file I can launch Word with its icon in Unity launcher, but if I associate .doc files to the same file Word will launch, but it won't open the .doc file.

If I associate .doc files to any .desktop file generated by Wine it will launch Word, but it will use Wine icon.

Edit: I recreated the original file for reference:

[Desktop Entry]
Name=Microsoft Word 2010
Exec=env WINEPREFIX="/home/nastys/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/nastys/.wine/dosdevices/c:/users/nastys/Start\\ Menu/Programs/Microsoft\\ Office/Microsoft\\ Word 2010.lnk
Path=/home/nastys/.wine/dosdevices/c:/Program Files/Microsoft Office/Office14
share|improve this question
can you add the wine generated .desktop file for reference? – RobotHumans Apr 17 '12 at 23:31
up vote 2 down vote accepted

Whether Word is suitable for DnD I don't know for sure, don't have. Anyway I'm pretty sure you can't have it both ways in the unity launcher with wine programs. The addon to the command to enable DnD doesn't make for the best launch command, ie. your program will be looking for the file to open.

What works a lot of the time is to add Z:%f to the end of the Exec= command, so using yours

Exec=env WINEPREFIX="/home/nastys/.mso2010" wine "C:/Program Files/Microsoft Office/Office14/WINWORD.exe" Z:%f

I don't think the d. quotes on your wine command are an issue here with DnD, if so then use \\\\ for folders, & \\ for spaces, like -

Exec=env WINEPREFIX="/home/nastys/.mso2010" wine C:\\\\Program\\ Files\\\\Microsoft\\ Office\\\\Office14\\\\WINWORD.exe Z:%f

This could give you DnD on the icon but produce complaining/error as a launcher. Not much to do there. What you could do if the DnD works is just use the icon for DnD, (don't left click on) & then add a quicklist to your .desktop to launch Word itself when desired.

I do use the Z:%f on other progs for Dnd & tested here with notepad where it worked fine.

share|improve this answer

You can do this:

1) Download the Microsoft Word Icon (example: from here)

2) Put it in a convenient folder (example: /home/<user>/Icons/)

3) Edit the .desktop file and put the entire path for the icon. Should looks like:


This is the result:

enter image description here

share|improve this answer
This is useless... I already have the icon. – nastys Apr 23 '12 at 20:52

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.