Alacarte does not recover deleted menu items

Bug #118936 reported by David Prieto
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Alacarte Menu Editor
Fix Released
Medium
alacarte (Ubuntu)
Fix Released
High
Unassigned
Nominated for Lucid by Hendrik Schrieber
Hardy
Won't Fix
High
Unassigned

Bug Description

Binary package hint: alacarte

If you delete a program's menu item form Alacarte you can never again recover it: neither pressing the "revert" button, not uninstalling that program and installing it again.

That makes deleting a launcher EXTREMELY dangerous, so please - either remove the "delete" function of Alacarte, and let the user just show or hide the launcher; or fix Alacarte so the revert button actually reverts the menu to a state where deleted launchers are recovered.

This bug is VERY serious in my opinion.

Revision history for this message
Travis Watkins (amaranth) wrote :

I can revert deleted things just fine here. Also you can hit Ctrl-Z to undo if you delete something by accident. Can you give detailed steps to reproduce?

Changed in alacarte:
status: Unconfirmed → Needs Info
Revision history for this message
David Prieto (frandavid100-gmail) wrote :

In my case:

-create a dummy user.

-log in with that user.

-open Alacarte.

-uncheck the "show" checkbox for Rhythmbox.

-right-click the Totem launcher and delete it.

-hit "revert".

The RB show checkbox becomes checked again, but the Totem launcher is nowhere to be seen. This procedure can be tested with any additional program; uninstalling and then reinstalling it won't recover the launcher. The user -me- has to manually create the launcher, and if he uninstalls the software the laucher stays there until he manually hides / deletes it.

Happens in my PC, at least.

Revision history for this message
Travis Watkins (amaranth) wrote :

Wow, when did that break? :) Will try to fix.

Changed in alacarte:
assignee: nobody → amaranth
importance: Undecided → High
status: Needs Info → Confirmed
Revision history for this message
David Prieto (frandavid100-gmail) wrote :

Thanks, Travis :)

Revision history for this message
Kevin (octopus-tentacles) wrote :

I can confirm that bug is still present in Gutsy

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

I confirm this bug too.

When an entry is deleted, an desktop file is created under .local/share/applications with the Hidden parameter set to true.
Then this entry, alacarte is not anymore aware of this entry as it seems gmenu never returns hidden entries.

When you revert a change, alacarte loops through the menu entries and delete the correspond file under .local/share/applications if it exists, but as it is not aware of this hidden entry it never delete the file and doesn't revert the deletion.

I don't know enough gnome menus freedesktop stuff but why not:

   - simply delete every files under .local/share/applications when the user choose revert

   - or not allow to hide (not delete) system-wide desktop entries

Revision history for this message
Ivan Jekic (the-edge) wrote :

Confirmed here also. I mistakenly deleted menu icon of TvTime program. I reinstalled the program, but main menu didn't display it, even though the ".desktop" file was there.

As a matter of fact, I think this bug is at least one year old. I remember I had similar problems in Breezy.

Changed in alacarte:
status: Confirmed → Triaged
Revision history for this message
Barry Knapp (bvwknapp) wrote :

I had a similar problem with Gusty. I uninstalled Wine but the wine items did not disappear from the applications menu. So I went into the main menu editor and deleted the menus. When I reinstalled wine the launchers did not reappear. I had to delete items from the .config and .local/share directory and deleted wine items from the applications.menu before reinstalling would put the launchers for wine back in the applications menu.

Revision history for this message
Sebastien Bacher (seb128) wrote :

That should be fixed for hardy

Changed in alacarte:
milestone: none → ubuntu-8.04
Revision history for this message
James Westby (james-w) wrote :

Hi,

Attached is a patch to make undo work with deleted items.

However, the way gmenu is currently written I don't think
that revert can resurrect the deleted items.

It reverts the item by iterating all children of the menu
and removing the .desktop files from the user's home
dir.

However deleted items (those that are set to hidden
in the .desktop file, rather than the menu) are not
included in the children, and so are not reverted.

I see a couple of options:

  1. remove the delete option. The user can just
      hide anything that they don't want.
  2. As well as iterating children, just clear out
      the user's .desktop files. Would this delete
      things that alacarte didn't create?

Thanks,

James

Revision history for this message
Steve Langasek (vorlon) wrote :

This still looks to me like an important bug to try to fix for hardy - at least the part that we know is fixable and have a patch for. Assigning to the 8.04.1 milestone; Travis, would you be willing to prepare the SRU for this?

Changed in alacarte:
milestone: ubuntu-8.04 → ubuntu-8.04.1
Revision history for this message
Travis Watkins (amaranth) wrote :

This patch just exposes another bug in alacarte that seems to only show up when deleting a KDE menu item. But seeing how it was completely broken and now is just partly broken I'm not sure what to do with it.

Revision history for this message
Travis Watkins (amaranth) wrote :

I've opened bug 225941 for the part of this we can currently fix as these are two separate issues.

Changed in alacarte:
milestone: ubuntu-8.04.1 → none
Steve Langasek (vorlon)
Changed in alacarte:
assignee: amaranth → nobody
milestone: ubuntu-8.04.1 → none
status: Triaged → Won't Fix
Changed in alacarte:
assignee: amaranth → nobody
Revision history for this message
moli (f-launchpad-moli-hu) wrote :

thanks 'Barry Knapp wrote on 2008-02-21'!
alacarte suxx ;(

Revision history for this message
Juan Simón (simonbcn) wrote :

Ubuntu Jaunty

I uninstalled Wine, I have deleted the entire menu section of Wine, which was not cleared with the removal. But then, when I reinstalled Wine, the menu entry is not created.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I'm using lucid. I clicked delete on one of the entries. There was no aperant way to revert the change (i.e. a "undo" button). I've pressed Ctrl+Z and the entry got resurrected. Please provide steps to reproduce this bug in Lucid.

Changed in alacarte (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in alacarte (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Travis Watkins (amaranth) wrote :

The problem is that you can't undo the delete after you close alacarte.

Changed in alacarte (Ubuntu):
status: Invalid → Triaged
Revision history for this message
Kjell L. (lkjell) wrote :

Why but why are there two places that the files are being kept? One in ~/.local/share/application and the other is ~/.config/menus

I figured that top level entries are kept in config while the rest is in local. Assume I delete my Wine entry then I need to edit files in config to get it back. If I edit other stuff under Wine like programs then I need to edit the local to get it back. Confusing?

Revision history for this message
Pavlo Verba (pavlo.s.verba) wrote :

I got myself in an unpleasent situation on Lucid with this thing today, regrettably noticing I've got a few missing entries after closing alacarte.

Is there a way to restore deleted application launchers, except for manually adding them?

And if there is a working «Ctrl + Z» shortcut, isn't «Undo» button needed too?

This bug is three years old already, I hope it is going to be fixed some day after all.

Revision history for this message
Hendrik Schrieber (hennekn) wrote :

Still need a patch that restores deleted items. Tagging patch-needswork.

tags: added: patch-needswork
Changed in alacarte:
status: Unknown → New
Changed in alacarte:
importance: Unknown → Undecided
Revision history for this message
Hendrik Schrieber (hennekn) wrote :

I have a question on this issue: What is revert actually supposed to do? Is it supposed to restore all existing menu entries, which means the default (system) entries and the ones installed packages created or is it supposed to just restore menu entries that you could see after a fresh install? If the first is true I don't see why we cannot just delete all the .desktop-files in .local/share/applications to unhide deleted entries. I mean the entries still exist in /usr/share/applications so we only have to unhide them, don't we?

Changed in alacarte:
status: New → Confirmed
Revision history for this message
Travis Watkins (amaranth) wrote :

The problem is things like WINE place files in ~/.local/share/applications for Windows apps you install so you can't just wipe them all out.

Changed in alacarte (Ubuntu):
status: Triaged → Confirmed
Changed in alacarte:
assignee: nobody → jorge rodriguez (jorgenarcea14)
Changed in alacarte (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Vadim Rutkovsky (roignac) wrote :

Fixed in 0.13.2 version

Changed in alacarte:
assignee: jorge rodriguez (jorgenarcea14) → nobody
importance: Undecided → Unknown
status: Confirmed → Unknown
Changed in alacarte (Ubuntu):
status: Triaged → Fix Released
Changed in alacarte:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
bwat47 (bwat47) wrote :

This bug still exists in alacarte in precise... I just had it happen to me after deleting the google chrome menu entry. Finall stumbled upon this bug report and deleted the file in .local/applications and now chrome shows again.

Revision history for this message
aleandro (aleandrodasilva) wrote :

Ubuntu 13.10. I deleted some entries and I cannot restore them. Libreoffice is totally unseen from the system yet. Thr icons in the unity launcher are gone. Terrible bug. Reinstallation is needed.

Revision history for this message
Josh Ventura (joshv10) wrote :

For those who have deleted things not realizing how permanent and global this would be, you can revert everything by deleting `~/.local/share/applications`. I know it's not ideal, but it's better than screwing everything else up trying to fix it some other way.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.