How to add icon for application installed via .deb file?
I just installed an Evernote client called Tusk via their .deb file, because the version in the official Ubuntu software repository will not play nicely when connected to my VPN. This new installation works fine with the VPN but the app icon is now simply a gear. I would like to change this but don't know how. Help would be greatly appreciated.
2 Answers
Create a .desktop file in ~/.local/share/applications/ , perhaps tusk.desktop, with
nano ~/.local/share/applications/tusk.desktop
In that file, add these lines
[Desktop Entry]
Name=Tusk
Comment=
Exec=*command to run*
Icon=/path/to/tusk/highres-icon.png
Terminal=false
Type=Application
StartupNotify=trueSave the file, and there's your Tusk desktop launcher.
1Probably related to this bug reported by Linux Mint user and confirmed by Ubuntu 18.04 users:
The accepted solution there:
So, I tried a few things just to learn a bit more about how icons work in desktop Linux and here's what I found.
First, I edited
/usr/share/applications/tusk.desktopand changed theIcon=line back to simplyIcon=tuskThen, I ran:sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/I wanted to see if the icon cache just hadn't gotten updated after Tusk was installed. But, it seems that the icon in the
/usr/share/icons/hicolor/0x0/appsfolder is ignored bygtk-update-icon-cahcebecause after updating the cache there was still no icon in the Mint start menu or taskbar when (when Tusk is running). Curiously, the Tusk icon in the "system tray" part of the Mint taskbar works.So, leaving
Icon=tuskin the.desktopfile, I installed imagemagick and did the following:
cd /usr/share/icons/hicolor/0x0/appssudo convert tusk.png -resize 512x512 /usr/share/icons/hicolor/512x512/apps/tusk.pngsudo gtk-update-icon-cache -f /usr/share/icons/hicolor/After using those commands to make a 512x512 version of the icon in the appropriate folder and updating the icon cache, the Tusk icon is appearing in the Mint start menu and taskbar.