Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
Type=Application
StartupNotify=true
Comment=Create and edit professional-looking documents such as letters, papers, reports, and booklets by using Microsoft Word.
Icon=29F5_WINWORD.0
StartupWMClass=WINWORD.EXE
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
Type=Application
StartupNotify=true
Path=/home/nastys/.wine/dosdevices/c:/Program Files/Microsoft Office/Office14
Icon=0575_wordicon.0
share|improve this question
    
can you add the wine generated .desktop file for reference? –  hbdgaf Apr 17 '12 at 23:31
add comment

2 Answers 2

up vote 2 down vote accepted
+50

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
add comment

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:

Icon=/home/<user>/Icons/microsoft_office_word.png

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
add comment

Your Answer

 
discard

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.