0

Whenever I want to change an app's icon I open its .desktop file and change the icon= parameter. But there are apps (mostly solutions not apps!) like Google Keep, etc. which have no .desktop files in /usr/share/applications/ neither in ~/.local/share/applications and they are shown with a general icon in launcher (let's say a gear or somewhat) How can I assign icons to them?

  • 1
    I am not aware of the existence of an app like Google Keep. Can you be more specific about the apps with which you have issues? How do you download them? How do you install them? – vanadium May 16 '22 at 12:11
  • I use this one: https://github.com/lukassr/keep-desktop Downloaded the deb file and installed using "sudo apt install ./keep*.deb" – Masoud Borbor May 16 '22 at 12:38

2 Answers2

1

You cannot assign an icon without a .desktop file. Thus

  • Create a .desktop file for your application in the directory ~/.local/share/applications.
  • Find an appropriate icon in .png, .svg or .ico format and place it in ~/.local/share/icons. Make that directory if it does not yet exist. In the .desktop file, it is sufficient to specify the name without extension of the icon graphic. If you choose the place the icon elsewhere, you can provide the full path name.

This way, the launcher will appear in your application overview or menu with the icon you selected.

If, upon launching, the running instance does not anymore have the correct icon, then you will need to add a StartupWMClass= line, where you provide the window class of the running program.

vanadium
  • 88,010
1

There is no app without a .desktop file in the launcher. To see the path of these apps, you can install menulibre.

sudo apt install menulibre

After installation, open MenuLibre and search for the app which icon you want to change. The .desktop file path will be displayed in the bottom center of the window.
I do not prefer to use this app to change the icon, it's really not good for editing .desktop files.
Screenshot