4

I want to reset the configuration and order of MenuLibre. How can I do it?

I try:

sudo apt-get --reinstall install menulibre

But the order of the app keep in the same way.

I throw off all the apps from his folders. Now I have something like (see photo). I want to reset this action.

MENULIBRE

1 Answers1

2

MenuLibre is a menu editor for the FreeDesktop.org Desktop Entry and Menu. A menu editor does not provide menu configuration by itself, so reinstalling MenuLibre will not reset the menu.

Where is the menu

Open a terminal and run MenuLibre with verbose option.

menulibre -v

The command will show debug messages in the terminal.

** (menulibre:2801): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-5v4S1677tg: Connection refused
DEBUG:menulibre: set_up_logging() 'logging enabled'
DEBUG:menulibre: __init__() 'Using menu: $HOME/.config/menus/xfce-applications.menu'
DEBUG:menulibre: block() 'Blocking history updates'
DEBUG:menulibre: unblock() 'Unblocking history updates'

MenuLibre apparently reads from a configuration file that is found at $HOME/.config/menus/xfce-applications.menu and $HOME is actually the path to home directory of current user.

How to reset the menu

First, quit MenuLibre. Then in the terminal, run the following command.

rm -i $HOME/.config/menus/xfce-applications.menu

User will be asked to confirm the action for removing the file. Press Y and Enter to proceed.

Finally, run MenuLibre again. The menu will be restored to default configuration.

Additional notes

MenuLibre will always look for configuration file in $HOME/.config/menus directory, regardless the file exist or not. If the configuration file is missing, MenuLibre will either recreate the configuration file or read from the default (or possibly last known) configuration file.

If MenuLibre didn't recreate the file for any reason, user can manually restore the default configuration file for Xubuntu by copying from XDG directory.

cp /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu $HOME/.config/menus/xfce-applications.menu

Again, $HOME is the path to home directory of current user.

The following situation or limitation may apply:

  • The reset procedure will work, assuming that the existing shortcuts are all valid and the default .menu file in /etc/xdg directory has not been edited.

  • Usually, the package manager will automatically remove shortcuts of uninstalled applications and rebuild the application menu automatically.

  • If uninstallation was done manually and improperly, the shortcuts of uninstalled applications might be left in the file system directories; These may have to be removed manually from /usr/share directory, or depending on how the shortcuts were added.

  • Also, running sudo apt-get remove [package] command will not remove the configuration files (may include shortcuts); run sudo apt-get purge [package] for otherwise.

  • If the original default menu was heavily modified, consider reinstall the package that provides the menu. For example, /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu is provided by xubuntu-default-settings.

Tested in Xubuntu 14.04.

TL;DR Delete the config file, then run MenuLibre again. Back to default. This will not fix invalid or unwanted shortcuts, as a result of improperly removed applications.