I just added and modified a .desktop file in my /home/user/.local/share/applications folder.
Is there any way to refresh the icon and caption in the list of applications without logging out?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can restart the gnome-shell by pressing Alt+F2 and then typing in either “restart” or just “r” and pressing Enter.
Otherwise I’ve noticed that it automatically refreshes .desktop files after waiting a little while.
Method 2
From Desktop entries in Arch linux wiki, this works on later versions of Gnome:
update-desktop-database ~/.local/share/applications
Method 3
Cross-posting this from the Ubuntu question site.
You need to:
- Update the timestamp on the top-level icon directory
- Run
gtk-update-icon-cache
Note: hicolor is the default theme which app developers should use. if you’re making an icon theme, refresh your icon theme’s folder instead.
sudo touch /usr/share/icons/hicolor ~/.local/share/icons/hicolor sudo gtk-update-icon-cache
See (the only documentation I can find for this): https://fedoraproject.org/wiki/Packaging:Scriptlets#Icon_Cache
Method 4
Please refer to the XDG Desktop Menu Specification. To update the list of available desktop launchers in the Applications menu please run:
xdg-desktop-menu forceupdate
The update will be reflected in couple seconds.
Method 5
I tried few ways, including these posted here, but none worked except this one
gnome-shell --replace & disown
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0