I'm still running Ubuntu 10.04 LTS with GNOME 2.30 at this late date and
just encountered this problem after installing LibreOffice 4.3.5, using
a DEB archive obtained from LibreOffice.org.  I didn't like the way the
installer put the entries in the Applications menu and began editing the
menu with alacarte (System -> Preferences - > Main Menu).  During this
edit I made a mistake, deleting a menu item, so I clicked on the
"Revert" button, after which havoc ensued.  A number of custom sub-menus
changed from their original names to "alacarte-made-x", where "x" was
some number, and those entries became non-editable.  The problem appears
to have been caused by alacarte improperly deleting one or more of its
.directory files in /home/<user>/.local/share/desktop-directories and
*possibly* by the LibreOffice installation causing additional
corruption.  I was able to recover by using the following steps.

1. In a terminal window in my home directory, I executed
   sudo chown -R <user> .config/menus
   sudo chown -R <user> .local

   (Substitute your user name for <user>.)  This fixes improper file
ownership issues.  Some of the alacarte-made non-editable menu entries
now became accessible with the Properties button, but several  menus
became cross-linked, so that when the name of one menu was changed in
the menu editor, the name of another, completely unrelated menu also
changed.

2. I looked in my .config/menus directory to find an "undo" .menu file
with a time stamp just after the new package was installed.  This was
easy, because the file with LibreOffice 4.3.5 had entries containing
"4.3.5" that could be found with a text editor.  I renamed
applications.menu as applications.menu.bak, then copied my chosen .menu
.undo-xx file to applications.menu.

3. The first two steps still didn't fully correct the problem, but by
looking in .local/share/desktop-directories and examining the contents
of the various .directory files and comparing what alacarte-made-x
entries there were displayed in my Applications Menu.  From this I was
able to deduce which .directory files were missing and using gedit I was
able to recreate them, using the existing .directory files as a
template.  Once the missing alacarte-made-x.directory files were
restored, the cross-linking of submenu entries in the Applications menu
was fixed, allowing all submenus and items to be edited normally again
with the Properties button.

A more drastic alternative would have been to wipe out the contents of
.local/share/desktop-directories and .config/menus and start over, but a
bit of patience in performing manual repairs as described above saved me
many, many hours of menu creation and customizing.

I think this may not be a bug in alacarte as such, but a general lack of
robustness in the GNOME 2 menu and the design of alacarte, in that
alacarte is unable to detect corruption in the menu files or missing
directory files, and simply gets confused.  The utility should have
automatic error detection and correction built in, or a button or menu
that can be invoked manually by the user to repair the menu structure
when something goes amiss.  There may also be problems with the way the
Revert feature works in alacarte, which *may* have been the cause of the
problem in this instance.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/499754

Title:
  I can not edit menu entries in alacarte at random - Ubuntu Lucid
  (10.04)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/499754/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to