Linux Icon solution idea #7599
Replies: 2 comments 3 replies
-
The standard icons directories (
Does this actually work for you? My desktop environment is ignoring it. I see that there's also a |
Beta Was this translation helpful? Give feedback.
-
Normally GUI applications provide a .desktop file so they can be discovered and launched from the desktop environment's launcher. With the added benefit that they can specify localized program description, additional arguments, etc. And non-GUI applications are intended to be launched from command-line, so they do not need an icon.
As far as I'm concerned, neither the bootloader nor bootstrap scripts are the place for this sort of magic. But nothing prevents you from implementing the logic in your application code, if you really want your application to install the icon for itself and modify the gio metadata. |
Beta Was this translation helpful? Give feedback.
-
A while ago I ported one of my applications that are using PyInstaller over to Linux. It works great, but I'm still bothered that it doesn't have an icon.
I know that on Linux, single-file executables don't have icon metadata. And my understanding is that normally applications add their icons to the desktop environment as part of the install process.
So I've been thinking, what if PyInstaller installs and sets an icon as part of the bootstrapping process it does? After executing the application once, the executable will have an icon!
The idea would be to extract the icon to a standard location (see
https://martin.hoppenheit.info/blog/2016/where-to-put-application-icons-on-linux
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-0.13.html#install_icons
for potential locations, I'm no Linux pro myself)
Then run some variant of
gio set ./my_frozen_app metadata::custom-icon file://./path/to/icons/locations/PyInstaller/my_frozen_app_icon
Some thoughts may have to be put into making sure to avoid filename conflicts.
Beta Was this translation helpful? Give feedback.
All reactions