Restore Wine menu item Ubuntu 11.10 (Resolved)

Hi to all, since I removed Wine and reinstalled it I have lost the “Programs” menu item. I have right clicked Applications and used Edit Menus but Programs is not an option that can be ticked under Wine.

Anyone know how to get this menu item back.

Thanks in advance…

What’s the output from:

ls -a ~/.config/menus/applications-merged

?


I take it you’re running the “Gnome Classic” desktop ?

have you got the alacarte menu editor installed ?

Yes I’m running the Classic Desk Top. No I do not have alacarte menu editor installed.

Read out-

userone@office2:~$ ls -a ~/.config/menus/applications-merged
.

user-870B770D-799D-746A-68C9-0EC9EB5D43AE-FantasticFarm.menu
wine-Programs-Bonjour-About Bonjour.menu
wine-Programs-Bonjour-Bonjour Printer Wizard.menu
wine-Programs-Microsoft Office-Microsoft Excel 2010.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Digital Certificate for VBA Projects.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Microsoft Clip Organizer.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Microsoft Office 2010 Language Preferences.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Microsoft Office 2010 Upload Center.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Microsoft Office Picture Manager.menu
wine-Programs-Microsoft Office-Microsoft Office 2010 Tools-Office Anytime Upgrade.menu
wine-Programs-Microsoft Office-Microsoft PowerPoint 2010.menu
wine-Programs-Microsoft Office-Microsoft Word 2010.menu
userone@office2:~$

Well I don’t know which menu editor you’re using … but if you install alacarte:

sudo apt-get install alacarte

Then go to Applications>Other>Main Menu … when the menu editor opens, in the left-hand column, is there a “Wine” folder with a “Programs” sub folder ?

That’s what is missing the “Programs” sub folder there are 4 other sub folders but “Programs” is missing.

So what happens if (in the menu editor) you create the subfolder “Programs”

I tried this and I need to enter a command in the command box, have not got a clue what command to put in to the box.

What’s the contents of:

gedit ~/.config/menus/applications.menu

?

Applications /etc/xdg/menus/applications.menu System /home/userone/.local/share/desktop-directories brasero-nautilus.desktop /home/userone/.local/share/applications nautilus-browser.desktop apturl.desktop bdgui.desktop deja-dup.desktop brasero-nautilus.desktop gconf-editor.desktop nautilus-browser.desktop fslint.desktop gdm-guest-session.desktop kde4-k3b.desktop kde4-nepomukbackup.desktop hplj1020.desktop kde4-nepomukbackup.desktop cairo-dock.desktop gconf-editor.desktop cairo-dock-cairo.desktop autopackage-launcher-gtk.desktop Graphics evince.desktop /home/userone/.local/share/applications Internet transmission-gtk.desktop /home/userone/.local/share/applications tsclient.desktop evolution-mail.desktop empathy.desktop vinagre.desktop evolution-settings.desktop Office evolution.desktop /home/userone/.local/share/applications Accessories /home/userone/.local/share/applications gedit.desktop gksu.desktop gnome-about.desktop wine-wine wine-Programs wine-Programs-Cake Mania 2 wine-Programs-Cake Mania 2-Cake Mania 2.desktop /home/userone/.local/share/applications wine-Programs-Cake Mania 2-Cake Mania 2 Website.desktop wine-Programs-Cake Mania 2-Uninstall.desktop wine-Programs-Skype wine-Programs-Skype-Skype.desktop /home/userone/.local/share/applications wine-Programs-Xara wine-Programs-Xara-Xara Web Designer 6 /home/userone/.local/share/desktop-directories alacarte-made.desktop alacarte-made-1.desktop alacarte-made-2.desktop alacarte-made-3.desktop alacarte-made-4.desktop alacarte-made-5.desktop alacarte-made-6.desktop wine-browsedrive.desktop wine-winecfg.desktop wine-uninstaller.desktop wine-winetricks.desktop Multimedia vlc.desktop /home/userone/.local/share/applications Other /home/userone/.local/share/applications wine-extension-htm.desktop wine.desktop Universal Access onboard.desktop /home/userone/.local/share/applications Accessories Debian Education Games 870B770D-799D-746A-68C9-0EC9EB5D43AE-FantasticFarm Graphics Internet Office Other Development Science Multimedia System Universal Access wine-wine ubuntu-software-center.desktop

I can find no “easy” way to do this … but it can be done.

Run this command:

tar -zcvf ~/applications-merged.tar.gz ~/.config/menus/applications-merged

You’ll then find an archive in your Home directory called applications-merged.tar.gz … can you attach this to your next posting.
(keep a copy of this … we may need it later)

As requested.

OK … let’s try something …

Open wine-Programs-Microsoft Office-Microsoft Word 2010.menu for editing:

gedit ~/.config/menus/applications-merged/"wine-Programs-Microsoft Office-Microsoft Word 2010.menu"

A file should open that reads:-

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>wine-wine</Name>
    <Directory>wine-wine.directory</Directory>
  <Menu>
    <Name>wine-Programs</Name>
    <Directory>wine-Programs.directory</Directory>
  <Menu>
    <Name>wine-Programs-Microsoft Office</Name>
    <Directory>wine-Programs-Microsoft Office.directory</Directory>
    <Include>
      <Filename>wine-Programs-Microsoft Office-Microsoft Word 2010.desktop</Filename>
    </Include>
  </Menu>
  </Menu>
  </Menu>
</Menu>

edit it so it now reads:-

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>Wine</Name>
    <Directory>wine.directory</Directory>
  <Menu>
    <Name>Programs</Name>
    <Directory>Programs.directory</Directory>
  <Menu>
    <Name>Programs-Microsoft Office</Name>
    <Directory>Programs-Microsoft Office.directory</Directory>
    <Include>
      <Filename>wine-Programs-Microsoft Office-Microsoft Word 2010.desktop</Filename>
    </Include>
  </Menu>
  </Menu>
  </Menu>
</Menu>

so here are the bits you’re changing (you’re changing the bits in red):-

Applications wine-wine [b]<--- CHANGE TO A CAPITAL W[/b] wine-wine.directory [b]<--- DELETE[/b] wine-Programs [b]<--- DELETE[/b] wine-Programs.directory [b]<--- DELETE[/b] wine-Programs-Microsoft Office [b]<--- DELETE[/b] wine-Programs-Microsoft Office.directory [b]<--- DELETE[/b] wine-Programs-Microsoft Office-Microsoft Word 2010.desktop [b]<--- LEAVE AS IS[/b]

SAVE the file.

IS there now a menu item at:-
Applications > Wine > Programs > Microsoft Office > Microsoft Word 2010
?
(BTW, there’s no need to reboot or even log off/on … it will either show immediately or not at all)

If that works … we’ll do the other WINE programs too … but I want to test one first, as it’s less hassle to undo.

It may also be necessary to move/rename the ~/.config/menus/applications.menu file, but I want to try without first … so just let me know if it appears in the menus or not.

When I opened file for editing it was empty so I copied the new contents into the file and tried to save it and got this error - “Could not find the file /.config/menus/applicati…-Microsoft Word 2010.menu.”

My apologies … typo in the gedit command (missing tilde) … fixed above, so try again :-[

Yes there is a new folder at - Applications > Wine > Programs > Microsoft Office > Microsoft Word 2010

It is not part of the Wine folder which is lower down the list. Having a separate folder would not be an issue as long as all programs installed with Wine go in that folder.

is there anything that IS in the original Wine folder ? … if so, what ?

Can you also post any output from:

find /home/userone -name *.directory

Have you also got a menu item:-
Applications > wine-wine
?

Does the NEW (the one with Word in it) Applications>Wine menu item have the wine glass symbol as its icon ? … do any of them ?

In the Original Wine folder there is - Browse C: Drive, Configure Wine, Uninstall Wine Software, Winetricks.
This folder has a wine glass icon.

The new folder dose not have a wine glass icon just a normal folder.

Output you requested -

userone@office2:~$ find /home/userone -name *.directory
/home/userone/.adobe/Flash_Player/NativeCache/19161DB1A6F7DA235681214946791CA0/61f1ce9e/Info.directory
/home/userone/.adobe/Flash_Player/NativeCache/19161DB1A6F7DA235681214946791CA0/Info.directory
/home/userone/.adobe/Flash_Player/NativeCache/19161DB1A6F7DA235681214946791CA0/3e68732c/Info.directory
/home/userone/.adobe/Flash_Player/NativeCache/19161DB1A6F7DA235681214946791CA0/70b7653e/Info.directory
/home/userone/.adobe/Flash_Player/NativeCache/19161DB1A6F7DA235681214946791CA0/372e6315/Info.directory
/home/userone/.adobe/Flash_Player/NativeCache/Updater.directory
/home/userone/.adobe/Flash_Player/NativeCache/50A1CF0242F7480909CAF6B361521A85.directory
/home/userone/.adobe/Flash_Player/NativeCache/NativeCache.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Xara-Xara Web Designer 6.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Hexacto Games-Lemonade Tycoon.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Skype.directory
/home/userone/.local/share/desktop-directories/wine-Programs.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Sierra-Emperor - Rise of the Middle Kingdom.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Cossacks - The Art Of War.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Cake Mania 3.directory
/home/userone/.local/share/desktop-directories/wine-wine.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Cake Mania 2.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Samsung.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Samsung-Kies.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Sierra.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Firaxis Games.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Microsoft Office-Microsoft Office 2010 Tools.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Microsoft Office.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Expat Shield.directory
/home/userone/.local/share/desktop-directories/Utility.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Firaxis Games-Sid Meier’s Civil War Collection-Troubleshooting.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Bonjour.directory
/home/userone/.local/share/desktop-directories/wine-Programs-LaCie-Ethernet Agent.directory
/home/userone/.local/share/desktop-directories/wine-Programs-LaCie.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Firaxis Games-Sid Meier’s Civil War Collection.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Hexacto Games.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Xara.directory
/home/userone/.local/share/desktop-directories/wine-Programs-Cossacks - European Wars.directory
userone@office2:~$

Most of the programmes listed are no longer on the computer because I uninstalled Wine and then reinstalled.

Is there an Applications>wine-wine menu item ?

Run this:

tar -zcvf ~/desktop-directories.tar.gz ~/.local/share/desktop-directories

you’ll then find an archive called desktop-directories.tar.gz in your Home directory … can you attach that to your next posting.

Just trying to get my head round how tangled the menu structure is :o

That and the previous archive aught to allow me to untangle things by experimentation if necessary :slight_smile:

I can not find an Applications>wine-wine menu item.

OK, try this …

gedit ~/.config/menus/applications-merged/"wine-Programs-Microsoft Office-Microsoft Word 2010.menu"

and put it back to its original state … so make sure it reads:-

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
  <Name>Applications</Name>
  <Menu>
    <Name>wine-wine</Name>
    <Directory>wine-wine.directory</Directory>
  <Menu>
    <Name>wine-Programs</Name>
    <Directory>wine-Programs.directory</Directory>
  <Menu>
    <Name>wine-Programs-Microsoft Office</Name>
    <Directory>wine-Programs-Microsoft Office.directory</Directory>
    <Include>
      <Filename>wine-Programs-Microsoft Office-Microsoft Word 2010.desktop</Filename>
    </Include>
  </Menu>
  </Menu>
  </Menu>
</Menu>

SAVE the file, and exit gedit.

OK, now let’s try loosing ~/.config/menus/applications.menu which isn’t there by default anyway, though it does get created when you edit the menus.
(don’t panic, we’re not deleting it yet, just moving it to your Home directory … we can always put it back :wink: )

Run:

mv -v ~/.config/menus/applications.menu ~/applications.menu

Now what is displayed in the Applications menu ?