Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 16774  / 1 Year ago, mon, march 27, 2023, 2:48:34

My goal is to create a working launcher for PHPStorm which will work in both the desktop and the Unity launcher, using the proper logo, in 12.04. I followed the instructions here - How can I create launchers on my desktop? - to create a launcher on the desktop using the Gnome dialog box. That worked a treat as far as the desktop was concerned, but dragging the icon to the Unity launcher gave it a weird icon:



enter image description here



The PHPStorm.desktop file looks like this:



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=gnome-panel-launcher
Name[en_GB]=PHPStorm
Exec=/home/shane/Software/PhpStorm-4.0.1/bin/phpstorm.sh
Comment[en_GB]=PHStorm
Name=PHPStorm
Comment=PHStorm
Icon=/home/shane/Software/PhpStorm-4.0.1/bin/webide.png


Next I tried to follow the accepted answer from here: How can I change the icon of an application in the Unity launcher?, but I found that there was no icons folder in ~/.local/share/. I went ahead and created it, and the rest of the folders mentioned in the answer, ~/.local/share/icons/hicolor/16x16/ etc. I then created a phpstorm.png in each folder, at the required sizes.



Next, I edited my PHPStorm.desktop file to the following and copied it to ~/.local/share/applications/



#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=phpstorm
Name[en_GB]=PHPStorm
Exec=/home/shane/Software/PhpStorm-4.0.1/bin/phpstorm.sh
Comment[en_GB]=PHPStorm
Name=PHPStorm
Comment=PHPStorm
Icon=phpstorm
#Icon=/home/shane/Software/PhpStorm-4.0.1/bin/webide.png


After logging back in, my unity launcher icon had disappeared completely, and the icon on my desktop had turned white.



What have I done wrong here? Why aren't the icons being picked up from the icons folder, and is the initial lack of icons folder something I should be concerned about?


More From » 12.04

 Answers
1

Regarding the icons folder


The only program that has icons in ~/.local/share/icons is Wine, so no, a default install shouldn't create the folder.


Most installed programs place their icons in /usr/share/icons, where all users can access them.


Regarding the .desktop file



I went ahead and created it, and the rest of the folders mentioned in the answer, ~/.local/share/icons/hicolor/16x16/ etc.



The icon has to be placed in a folder called ~/.local/share/icons/hicolor/16x16/apps/.


[#38967] Tuesday, March 28, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bunsistent

Total Points: 198
Total Questions: 108
Total Answers: 121

Location: Monaco
Member since Sun, Jan 16, 2022
2 Years ago
;