Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1632  / 3 Years ago, sat, july 17, 2021, 9:28:16

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:windowscommandstart.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

More From » launcher

 Answers
6

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 FilesMicrosoft OfficeOffice14WINWORD.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.


[#39282] Monday, July 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aveerakfas

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
1 Year ago
;