11

I happily run Word 2007 via Wine on my Ubuntu 12.04 desktop. I prefer having it sit in the launcher for easy access, however, every time I start a new session (that is, logging in or booting up), the Word launcher has disappeared.

Could this be a bug or am I doing something wrong?

Jorge Castro
  • 71,754
  • open the word .desktop in .local/share/applications in a text editor & post contents – doug Aug 03 '12 at 23:13
  • http://pastebin.com/YZ7BNEc8 –  Aug 03 '12 at 23:39
  • Your Exe= won't work well in the launcher. If you could browse to the .exe & post the exact path inc. the exact name of the .exe it would be easy to edit or create a new .desktop. I could take a guess that this may work, though only a guess. Exec=wine C:\\\\Program\\ Files\\\\Microsoft\\ Office\\\\Microsoft\\ Office\\\\Word\\\\WINWORD.EXE What this is using is \\ for directories, \ for spaces. There are other ways also, if you post as requested & also your username can provide other alt Exec= lines – doug Aug 04 '12 at 18:08

4 Answers4

11

The problem is that the .desktop file is NOT in a standard directory. Launcher favorites need to be in either the /usr/share/applications directory or the ~/.local/share/applications folder (and NOT a subdirectory as my wine .desktop files are). Copy the .desktop file there and then drag it to the launcher to lock it there.

The other option is to set the full path to the launcher using gsettings, but that's a pain.

EDIT on further investigation, when I add the desktop file for Word on my system (residing in ~/.local/share/applications/wine/Programs/Microsoft Office/), its name is added in gsettings with - instead of / for its location. Doing the following with gsettings to correct it made it permanent for me:

gsettings get  com.canonical.Unity.Launcher favorites > myfavs.txt

Edit myfavs.txt to replace - with /:

['nautilus-home.desktop', .... , 'wine-Programs-Microsoft Office-Microsoft Office Word 2007.desktop']

becomes:

['nautilus-home.desktop', .... , 'wine/Programs/Microsoft Office/Microsoft Office Word 2007.desktop']

Then set it:

gsettings set com.canonical.Unity.Launcher favorites "`cat myfavs.txt`"

I filed a bug report here so that one shouldn't have to do this: https://bugs.launchpad.net/unity/+bug/1033577

Ian B.
  • 3,513
1

You are not doing anything wrong. That is just how wine is build.

To have Word 2007 in you launcher at all times, you can create a .desktop file that starts Word and drag it in your launcher. However this has the distinct disadvantage, that while Word is running to icons for it will sit in your launcher.

The desktop file could look like this (I don't use wine so not tested):

[Desktop Entry]
Name=Word 2007
Comment=Open Word 2007
Exec=wine ~/.wine/drive_c/Program\ Files/word.exe
Icon=network
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;
OnlyShowIn=GNOME;Unity;
X-GNOME-Keywords=Applications;WinWord;
Name[en_US]=Word 2007

Of course in this line

Exec=wine ~/.wine/drive_c/Program\ Files/word.exe

you need to replace the path with the real path to your word executable (which will most likely be in $HOME/.wine/).

It's not perfect, but the best I can do.

con-f-use
  • 18,813
  • Fact is that a .desktop file for Word is already present. It's in .local/share/applications and appears in the application lens. –  Aug 03 '12 at 17:38
  • Did you try dragging that one into your launcher (instead of using "Lock to Launcher" in the context menu when Word is running) ? – con-f-use Aug 03 '12 at 17:43
  • I did. I tried to lock it, which works, for the session being. I explained this in the OP. edit: dragging does not seem to be permanent either. –  Aug 03 '12 at 17:43
  • You did not say you tried anything else than to lock it to the launcher. My best quick and dirty fix is the one in my answer. You can try filing a bug though or check if one has already been filed: https://bugs.launchpad.net/unity – con-f-use Aug 03 '12 at 17:46
0

You could use the procedure I used in this post: How do I set a wine program (ex. Foxit Reader for Windows) as the default program? skipping the last step.

Then simply run the app and lock it to the Launcher. It should remain after logging out and in again.

To Do
  • 15,502
0

Nice, but the above 'fixes' do not seem to prevent Libra Office Write constantly, (repeatedly) going missing from its 'Locked' positioning on the launcher every time Cannonical Ties up the Hard Drive (sometimes for hours forcing several reboots) usually beginning about ten minutes from start up or reboot. (The Constant 'Disk Busy' also prevents many programs from responding or even functioning at all.)

Mokie
  • 11
  • 7