How do I correctly remove items from Wine Programs menu? [duplicate]
As soon as a Windows application creates a shortcut/directory in Wine Start Menu Programs directory (in particular I do this manually by means of Total Commander and it works), it gets reflected in Ubuntu Wine Programs menu. But when a shortcut/folder is removed (manually, by means of Total Commander again),the Ubuntu Wine Programs menu item persists, and this is an undesirable behaviour.
I've once done something causing Wine/Ubuntu to actually refresh the menu state and remove orphan items, but unfortunately I can't remember what. Do you know the way? I am specifically interested in hand-made/removed shortcuts, not installing/uninstalling Windows software.
Solution 1:
According to the XDG specification on where "shortcut links" are stores, you are looking for .desktop files which are saved for wine programs in the local home folder:
~/.local/share/applications/
In here you will find all your wine based desktop files as well as any locally installed programs and edits you've made tot he ubuntu applications menu using the alacart menu editor.
You can remove entries, or edit them and the Ubuntu applications menu will reflect the changes immediately.
Solution 2:
As the other answer says, the menu items are in ~/.local/share/applications/
. (By the way, in Kubuntu, the equivalent of alacarte to edit the start menu is: right-click the 'K' Kickoff Application Launcher icon in the panel, and choose Edit Applications...)
But for completeness here are some other places where Wine also seems to add program info for WINDOWSPROGNAME:
-
~/.config/menus/applications-merged/wine-Programs-WINDOWSPROGNAME.menu
references various .desktop entries, I think to create a Wine submenu. -
~/Desktop/WINDOWSPROGNAME.desktop
give the program an icon on your desktop. -
~/.local/share/desktop-directories/wine-WINDOWSPROGNAME.directory
gives the program a folder on your desktop. -
~/.wine/drive_c/users/YOUR_USERNAME/Start Menu/Programs
is Wine's internal simulation of the Windows start menu.
There may be more, someone else also made a similar list of locations in a Recreating Wine Menus in Gnome blog post. So to completely remove all traces of a program, you could remove the first few items and edit the last one. For some of these a configuration step reads the freestanding files to build the appearance of your desktop environment; you may have to rerun that configuration step or logoff/restart before the appearance cleans up.
"Uninstalling" in the Wine FAQ suggests you can run wine uninstaller
to Add/Remove programs. I haven't tried it to see which of these five things it removes.. If you install a newer version of a program like Quicken sometimes the old one won't show up in wine uninstall even though it still has menu entries.
Even after I did all this, there were still traces of WINDOWSPROGNAME left behind. ~/.local/share/icons/
contained icons for the program and its files.
For crossover after doing all the above searching , also look in ~/.cxoffice/Windows_XP/cxmenu.conf
. Deleting items there, deletes them from the edit menu in crossover.