Ubuntu

Comment 12 for bug 148565

Alistair Buxton (a-j-buxton) wrote :

Oops, I really mean standard one, sorry.

Anyway, here is a one-liner that will fix your gnome menu so you can edit those wine (and possibly other) broken .desktop files. It collapses all the sub-directories, renaming them with the same flat scheme alacarte would use and removing the originals.

find ~/.local/share/applications/ -mindepth 2 -iname '*.desktop' -type f | rename 'my($c) = 0; s{(/)}{ ++$c >= 7 ? "-" : $1 }ige'