Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
90
rated 0 times [  90] [ 0]  / answers: 1 / hits: 57215  / 2 Years ago, fri, may 20, 2022, 1:41:16

Let's say I changed/added some myapp.desktop file at ~/.local/share/applications/.
For some time Ubuntu Unity will still show me old applications shortcuts at Unity lens under Ubuntu button. It will take some time (or just a one restart) to get applications list updated there.



How I can force Unity reload ~/.local/share/applications and reflect shortcuts correctly in lens?


More From » unity

 Answers
3

A little late, but i stumbled upon this thread before finding a solution, atleast to my problem, googling something related, nearly giving up.



As per this guide help.ubuntu.com, don't just edit or create your .desktop files in /usr/local/share/applications or ~/.local/share/applications. Instead, create the file somewhere else and use



desktop-file-install <your_file.desktop>


to add the file.



E.g. you create ~/myapp.desktop and do



desktop-file-install --dir=$HOME/.local/share/applications ~/myapp.desktop


Existing files of the same name will be overwritten and unity updated, you can use --delete-original if the source is not needed anymore, or



sudo desktop-file-install ~/myapp.desktop


to install it for all users.


[#28446] Friday, May 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
berlorful

Total Points: 346
Total Questions: 90
Total Answers: 99

Location: Monaco
Member since Tue, Nov 30, 2021
2 Years ago
berlorful questions
Thu, Sep 2, 21, 10:12, 3 Years ago
Sun, May 9, 21, 20:55, 3 Years ago
Mon, Jan 16, 23, 23:19, 1 Year ago
Mon, Aug 29, 22, 05:43, 2 Years ago
;