Introduction
Whenever you make a new WINEPREFIX menu entries and context menu entries are recreated automatically; your default .wine
prefix will even be recreated, as you know, if winecfg
is run and it the prefix doesn't exist.
Even though you are probably using different versions of wine
and not just the system wine
in playonlinux
, removing system wine
will probably take playonlinux
with it, so there are some better alternatives that will stop wine
regenerating menu entries all the time.
Possible Solutions
I have found that there are really two distinct ways of dealing with the issue:
a) Refer to the wine FAQ and permanently disable the winemenubuilder
application, although that would generate quite a lot of error messages if you used default wine
to install programs rather than playonlinux
in the future. The alternative ways of dealing with winemenubuilder
are detailed in the FAQ, such as disabling it when a particular new application is installed or disabling it for all programs to be installed by placing an override in winecfg
.
OR
b) Just keep deleting the created menu entries by placing the commands below in a script and running it regularly. They are from the wine FAQ, and you should be careful if you use them and make sure you don't make any typos. The commands below will remove wine
applications (but not playonlinux
ones) from your menus.
Here is the full list of commands from the wine FAQ; use with caution and avoid typos:
rm -f ~/.config/menus/applications-merged/wine*
rm -rf ~/.local/share/applications/wine
rm -f ~/.local/share/desktop-directories/wine*
If you wish to see what will be removed, you can use printf
with command one and three above to list the items (You can examine the directory mentioned in command two manually if you wish). As an example,
printf '%s\n' ~/.config/menus/applications-merged/wine*
will format the list of items nicely so it is easily readable:
/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2 Help.menu
/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2.menu
/home/mike/.config/menus/applications-merged/wine-Programs-ViewNX 2-ViewNX 2 Readme.menu
Conclusion
In short, it is up to you which option you choose to use to solve your problem, but I personally think that the simplest way is to place the commands from the wine FAQ in a script and run it periodically.
In addition, for a general discussion of how to remove wine
context menu entries, which you may also be interested in, see my answer here:
which is applicable not just to Thunar
and Xfce, but all desktop environments that adhere to XDG standards.