1

Is it possible to regenerate those files somehow for every app that should be in Dash (Ubuntu 16.04)? I got them all deleted with rm command. Don't ask, my stupidity (I was following suggestions here: Applications don't appear in the Dash (14.04) and my problem was actually because I simply disabled the applications plugin in Dash itself, but while getting those files back I managed to delete them along the way). Launching an app through terminal works, and when secondary-clicked on the icon in Launcher it even gives an option to add to Dash, but that doesn't add the lists where with the secondary click you get options like "Launch in Private Mode" (firefox) or bookmarks for Nautilus (nautilus was actually re-added with a link to one of my folders, rather than the home folder). Reinstalling would probably solve it for each app, but that seems too nightmarish and besides I can't even find a list with all my gui apps that should be there (including the ones in System Settings and possibly somewhere else). Is it possible to restore it somehow or would reinstalling the OS be a more sensible solution?

  • Many applications or porocesses have specific options set in their .desktop files. You won't get them back without reinstall. – Jacob Vlijm Mar 1 '18 at 13:54
  • @Thomas Janowsky How did you disable the applications plugin in Dash?! – Shayan Mar 1 '18 at 14:22
  • @Shayan I have no idea, I wouldn't do that but I found it to be disabled – Thomas Janowsky Mar 1 '18 at 16:53
4

You can obtain a list of packages that think they own files in the directory using dpkg -S e.g.:

dpkg -S /usr/share/applications

Then re-install each one:

sudo apt install --reinstall <package>

There are ways to automate that by processing the dpkg output - but doing it by hand will be a reminder to be more careful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.