Adding (or fixing) support for the MATE desktop environment proved to be a challenge. Due to some incompatibility been gnome-menus, xdg-desktop-menu, MATE, and probably something that MenuLibre is doing wrong with all three… MenuLibre was failing to read the MATE directories which resulted in an always-empty menu structure. Getting past that, I found that some updates such as renaming menu items would either fail to update the menu or add duplicate directories.
The first improvement that came out of this series of fixes was to correctly determine that an empty menu is one that failed to load. MenuLibre will now correctly capture this and present the diagnostic dialog at startup to help with reporting a bug.
The second improvement was adding support for the vendor-prefixed directory structures. The KDE support already had this to some extent, but it’s now been further refined and should work for any desktop environment. Launchers found in vendor/vendor-*.desktop paths are now properly supported.
Third, and this is when things start getting hacky, was adding support for MATE in such a way that all of the systems would play together nicely. At startup, MenuLibre will now sync vendor directories (e.g. mate/mate-accessories.directory) to your user path and create temporary symbolic links to the top level:
This allows everything to speak the same language. When MenuLibre writes the menu file, it will resolve the real paths so the symbolic links are not needed, and clean up after itself. I don’t love this solution, but it’s proven to be the most stable.
The final improvement that came from adding support for MATE was accepting that not all menu updates can be made on the fly. MenuLibre will now prompt you to automatically restart your menu (the panels on MATE and Xfce, and Unity shell) when updates fail to apply. This feature is limited to only MATE, Xfce, and Unity for now.
Next Steps
I’m going to continue improving upon MenuLibre in the coming weeks but I’d like to get some early feedback on the features and fixes introduced in MenuLibre 2.3.0. Please report any issues on GitHub and try to refrain from shipping this development release on production systems.
Next, I’m going to start work on a snapshot system that will make it easier to reverse changes or even completely undo the changes MenuLibre makes to your system. There have been far too many reports of failed menu updates and empty menus and MenuLibre needs to better protect its users.
The highlight of this release (and the feature most needing testing) is support for the MATE desktop environment, at least as it is found in Solus and Ubuntu MATE. Other notable features are a new uninstallation script and improved automatic quoting support for launcher arguments.