Answer the question
In order to leave comments, you need to log in
How to assign your own Pycharm icon in Linux?
The *.desktop file has been created and the icon is displayed correctly there. But after launching the application, the icon is the one that goes by default.
There is a similar problem not only with PyCharm, but also, for example, in Valentina Studio, 1C:EDT.
Answer the question
In order to leave comments, you need to log in
Eugene TI , I was right. And that's the problem with applications written in Java. Found the solution here . You need to determine the value of the WMClass property of the problematic application. Run the following command in the console:
xprop WM_CLASS
Then click on the desired window. The command should output a line like:
WM_CLASS(STRING) = "jetbrains-pycharm-ce", "jetbrains-pycharm-ce"
StartupNotify=true
StartupWMClass=jetbrains-pycharm-ce # Здесь указываем первое значение полученное с помощью команды xprop WM_CLASS
The *.desktop file has been created and the icon is displayed correctly there. But after launching the application, the icon is the one that goes by default
echo -e '[Desktop Entry]\nEncoding=UTF-8\nName=PyCharm\nComment=PyCharm\nExec=/opt/PyCharm/bin/pycharm.sh\nIcon=/opt/PyCharm/bin/pycharm.png\nTerminal=false\nStartupNotify=true\nType=Application' | tee .local/share/applications/pycharm.desktop > /dev/null; sudo cp .local/share/applications/pycharm.desktop /usr/share/applications/; cd /tmp; wget https://download.jetbrains.com/python/pycharm-professional-2021.3.tar.gz -O pycharm.tar.gz; sudo tar -zxf pycharm.tar.gz -C /opt; cd /opt; sudo mv pycharm-2021.3 PyCharm; sudo chown -R $USER:$USER PyCharm; cd
Prescribing the path to the icon in *.desktop is an incorrect solution.
Any *.desktop linter will be sent by forest (desktop-file-vaidate for example).
It will be correct to copy the icon to /usr/share/pixmaps (if it is one and bitmap) and specify in *.desktop:
Icon=myicon
(no path, no extension)
Perhaps after changing *.desktop you need to update the icon cache, but this depends on the DE.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question