You will need to open the file (in your case /usr/share/applications/sktop) then read it for the Icon line. QFileIconProvider will not work in linux. If you refer to my post above you'll find exactly how to deal with icons in linux. I even tested it to be sure since I was only about 95% sure it wouldn't Icons in linux are not set in the binaries. Yea it definitely isn't going to work on linux. However, personally I am unconvinced this will work under Linux where, unlike Windows, icons are not embedded in executables. The major ones like KDE and Gnome both do said in how to get app icon with name of the app: Oh and not all window managers in linux use. In which case they won't have an icon associated with them and will get a default one. desktop file to be run so there may not be one at all. desktop items can exist, like ~/.local/share/applications, so it's not a foolproof method.Īlso apps in linux do not require a. However be aware that there are other places. desktop file associated with your application then find the Icon entry. So if you wanted to find the icon you could grep through /usr/share/applications looking for the. If the icon does not have a path (as is this case with this one) it will look in /usr/share/pixmaps for it. This sktop file is located in the system default path of /usr/share/applications. You can see here the application name is Slack and it's icon is set to slack. So you would have something like this: Įxec=env LD_PRELOAD=/usr/lib/libcurl.so.3 /usr/bin/slack %UĬategories=GNOME GTK Network InstantMessaging In linux icons are associated with the application via. I'm not sure I understand this entirely, but it sounds like you want to find the icon for an application based on the app name.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |