Mintmenu broken

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mike Easter

Mintmenu broken

Post by Mike Easter »

Mint 7 gnome

Somehow .config/menu/applications.menu became an empty 0 bytes file, and now my menu just says:

<snip>
Couldn't load plugin: applications:

Traceback (most recent call last):

File "/usr/lib/linuxmint/mintMenu/mintMenu.py", line 249, in PopulatePlugins
MyPlugin = X.pluginclass( self, self.toggle )

File "/usr/lib/linuxmint/mintMenu/plugins/applications.py", line 253, in __init__
mymenu = Menu( mainitems )

File "/usr/lib/linuxmint/mintMenu/plugins/applications.py", line 80, in __init__
self.directory = xdg.Menu.parse( menu )

File "/usr/lib/linuxmint/mintMenu/plugins/applications.py", line 49, in xdgParsePatched
raise xdg.Menu.ParsingError(_("Not a valid .menu file"), filename)

ParsingError: ParsingError in file '/home/measter/.config/menus/applications.menu', Not a valid .menu file

</snip>

How do I fix this? Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
viking777

Re: Mintmenu broken

Post by viking777 »

Try

Code: Select all

sudo apt-get --reinstall install mintmenu
in a terminal (as you don't have a menu you might have to launch a terminal by pressing Alt/F2 then typing gnome-terminal)

Can't guarantee it, but it won't hurt anything
Mike Easter

Re: Mintmenu broken

Post by Mike Easter »

viking777 wrote:Try

Code: Select all

sudo apt-get --reinstall install mintmenu
Thanks; no joy.

That is the mintmenu install operation 'worked' without error, but the menu problem/condition persists.
viking777

Re: Mintmenu broken

Post by viking777 »

Well, if you like long shots you could always try this :lol:

Below is my own copy of your empty file (.config/menu/applications.menu). I have modified it in two ways, firstly I have removed the entries for certain programs that I am certain you will not be running. Second I have replaced my username with a bunch of x's.

So if you don't get any more sensible ideas what I suggest you do it this. Copy and paste this file into your own .config/menu/applications.menu. When you have done this replace all the x's with your username. Of course not all the programs that I am running on Mint 7 will be the same as yours so not all the entries will work, neither will you have entries for many programs that you want access too. What I am hoping will happen is that it will give you a starting point to get your menu back again after which you can edit it to your needs.

Of course what might happen is that your mintmenu will be so confused that it will just not bother to start, but in that case you won't be any worse off than you are now will you?

If you get a more sensible suggestion then please take it!
<!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/applications.menu</MergeFile>
<Menu>
<Name>System</Name>
<Include>
<Filename>gconf-editor.desktop</Filename>
</Include>
<AppDir>/home/xxxxxxx/.local/share/applications</AppDir>
<Include>
<Filename>brasero-open-playlist.desktop</Filename>
</Include>
<Include>
<Filename>gdebi.desktop</Filename>
</Include>
<Include>
<Filename>gksu.desktop</Filename>
</Include>
</Menu>
<Menu>
<Name>Internet</Name>
<Exclude>
<Filename>pidgin.desktop</Filename>
</Exclude>
<AppDir>/home/xxxxxx/.local/share/applications</AppDir>
<Exclude>
<Filename>sun-java6-javaws.desktop</Filename>
</Exclude>
<Exclude>
<Filename>xchat.desktop</Filename>
</Exclude>
<Exclude>
<Filename>giver.desktop</Filename>
</Exclude>
<Exclude>
<Filename>evolution-mail.desktop</Filename>
</Exclude>
<Include>
<Filename>alacarte-made-2.desktop</Filename>
</Include>
<Include>
<Filename>alacarte-made-3.desktop</Filename>
</Include>
</Menu>
<Menu>
<Name>Office</Name>
<Exclude>
<Filename>evolution.desktop</Filename>
</Exclude>
<AppDir>/home/xxxxxxx/.local/share/applications</AppDir>
<Exclude>
<Filename>openoffice.org-impress.desktop</Filename>
</Exclude>
</Menu>
<Menu>
<Name>Multimedia</Name>
<Exclude>
<Filename>padevchooser.desktop</Filename>
</Exclude>
<AppDir>/home/xxxxxxx/.local/share/applications</AppDir>
<Exclude>
<Filename>gnome-sound-recorder.desktop</Filename>
</Exclude>
</Menu>
<Layout>
<Merge type="menus"/>
<Menuname>Accessories</Menuname>
<Menuname>Debian</Menuname>
<Menuname>Education</Menuname>
<Menuname>Games</Menuname>
<Menuname>Graphics</Menuname>
<Menuname>Internet</Menuname>
<Menuname>Office</Menuname>
<Menuname>Other</Menuname>
<Menuname>Development</Menuname>
<Menuname>Multimedia</Menuname>
<Menuname>System</Menuname>
<Menuname>Universal Access</Menuname>
<Filename>alacarte-made.desktop</Filename>
<Filename>alacarte-made-1.desktop</Filename>
<Separator/>
<Merge type="files"/>
</Layout>
</Menu>
BTW Don't copy and paste the Quote marks at the start of the file!
Mike Easter

Re: Mintmenu broken

Post by Mike Easter »

viking777 wrote:Well, if you like long shots you could always try this :lol:

Below is my own copy of your empty file (.config/menu/applications.menu).
Thanks for the idea. I fixed it :-)

It turns out that I recalled having another Mint7 install on an alternate partition on another computer, so I went over there and found that applications.menu. Mine was much much simpler than yours. Here's a copy below of the whole thing, except that pasting it here loses the levels of indents.

<!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/applications.menu</MergeFile>
<Menu>
<Name>Internet</Name>
<Include>
<Filename>alacarte-made.desktop</Filename>
</Include>
</Menu>
</Menu>

All of the 'real' stuff is in that applications.menu referred above in etc/xdg/menus. I looked at that file of mine and it was fine and full of content. So I replaced my empty applications.menu with the above content applications.menu and everything is fine now.

Thanks for the suggestion that pointed me in the right direction. I should have been able to think of fetching that file myself.
User avatar
Acid_1
Level 5
Level 5
Posts: 796
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

Re: Mintmenu broken

Post by Acid_1 »

Seen this before. This

I think this will solve it...

Code: Select all

cp /home/measter/.config/menus /home/measter/.config/menus.bak && rm -R /home/measter/.config/menus
If I recall correctly then it will erase the corrupt .menu files and replace them on reboot. So, reboot and see how that works. If that doesn't work, just rename menus.bak back to menus.

Tell us how this works.

EDIT:
I realize now that it has been solved. But in the future so you don't have to dig this thread up, erasing the /home/user/.config/menus directory should restore it after a reboot.
Locked

Return to “Software & Applications”