Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2765  / 3 Years ago, sat, may 8, 2021, 10:51:52

I have written a Python application (with pygtk and pymozembed) which I use very often.



In the Unity dash my application has an icon (as I definded in the .desktop file). But when I start it, there is no icon in the launcher. Just an empty hole.



Launcher file: /home/witek/.local/share/applications/kadro-reader.desktop



[Desktop Entry]
Name=Google Reader
Comment=Open site with Kadro: reader -> https://www.google.com/reader/view/
Icon=/home/witek/.kadro/sites/reader/icon.png
Exec=/home/witek/.kadro/sites/reader/start.sh
Categories=Network;
Type=Application


Python code for window initialization:



win = gtk.Window()
win.set_title("Google Reader")
win.set_icon_from_file("/home/witek/.kadro/sites/reader/icon.png")


How to add an Unity launcher icon to my Python application?


More From » unity

 Answers
3

I don't think icon in .desktop file takes full path. I think it takes the name of an icon and searches for that icon in the current icon theme.



Try to put that icon at ~/.icons/google-reader.png and in the .desktop file just put



Icon=google-reader

[#41612] Monday, May 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ronicod

Total Points: 71
Total Questions: 111
Total Answers: 111

Location: Montenegro
Member since Fri, Dec 10, 2021
2 Years ago
;