0

I am running Ubuntu 18.04 with the default Gnome 3 desktop shell and the Frippery applications menu shell extension.

I attempted to reorganize the menu using menulibre and complete chaos ensued: menulibre introduced dupicate entries, duplicate categories and other issues that alacarte could not deal with. In the end (and in desperation) I ditched menulibre, backed up and nuked all local desktop and menu files, and had alacarte restore the menu to the default configuration (using the "Restore System Configuration" button). My menu now once again behaves as it should.

However, I now have a metric ton of *.desktop files to be restored. Simply copying them back into ~/.local/share/applications along with the new *.desktop files that are already there (created by alacarte when it restored the menu to factory default) doesn't work; the applications don't show up in the menu nor in alacarte.

The only way to add applications to the menu that does anything at this time is to use alacarte to create a new entry. This creates a new file named alacarte-made.desktop that I can then edit and populate with the details of the desktop file I was trying to restore.

However, I can't rename the alacarte-made.desktop file into {application-name}.desktop. Once I do this the entry disappears from both alacarte and the menu until the filename is restored to alacarte-made.desktop.

My question: How can I restore existing .desktop files so that alacarte and the menu show them? Alternatively, how can I rename the alacarte-made.desktop files to whatever the application name is (as is the case with the files already there) so things remain manageable?

1 Answer 1

1

1. How can I restore existing .desktop files so that alacarte and the menu show them?

The default location where alacarte stores modified menu files is $HOME/.config/menus. For instance: $HOME/.config/menus/gnome-flashback-applications.menu

After adding the app_01.desktop file to the Science category, the gnome-flashback-applications.menu file may look like this

<?xml version="1.0" ?>
<!DOCTYPE Menu
  PUBLIC '-//freedesktop//DTD Menu 1.0//EN'
  'http://standards.freedesktop.org/menu-spec/menu-1.0.dtd'>
<Menu>
    <Name>Applications</Name>
    <MergeFile type="parent">/etc/xdg/menus/gnome-flashback-applications.menu</MergeFile>
    <Menu>
        <Name>Science</Name>
        <Include>
            <Filename>app_01.desktop</Filename>
        </Include>
        <Layout>
            <Merge type="menus"/>
            <Filename>app_01.desktop</Filename>
            <Merge type="files"/>
        </Layout>
    </Menu>
</Menu>

2. Alternatively, how can I rename the alacarte-made.desktop files to whatever the application name is (as is the case with the files already there) so things remain manageable?

After renaming an alacarte-made.desktop files, you have to edit the $HOME/.config/menus/gnome-flashback-applications.menu to update the desktop file name.

alacarte man page for Ubuntu 18.04: http://manpages.ubuntu.com/manpages/bionic/man1/alacarte.1.html There are also man pages for other versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .