This is a reboot of Linux feature request - add .desktop files for games (https://itch.io/t/46139/linux-feature-request-add-desktop-files-for-games), a thread from 5 years ago, with last reply 3 years ago, and now archived. I give more information on what I’m looking for.
I just stumbled on this today. My initial motivation was just to fix the app icon not working on my Unity game build on Linux, by providing a custom .desktop file with the correct icon. The task however is not easy, with the two main isues:
-
You need the .desktop file to be in Desktop or some share/applications folder to work completely (ie to run on double-click and/or be found in the Dash / application searcher). Nemo can open local .desktop files on double-click, but Nautilus users don’t seem able to do that (in latest versions and default config at least). And local .desktop files won’t be registered for application search anyway.
-
If the .desktop file is moved to those standard folders, a portable file with local path is not enough, you must write a full path to the executable and icon (which requires information on user’s local machine)
Writing a full path to the executable and icon would require some script to be run after installation to get user’s install path, which is not feasible unless I ask the user to run some setup script to generate this .desktop file (akin to Smartgit’s add-menuitem.sh script), which means extra instructions.
If itch.io (more exactly the desktop app) was able to automatically generate the desktop file, it would know about itch.io game install path and thus fill the .desktop file properly. Then, it could put the .desktop file to either the Desktop or some share/applications folder (or both, like Steam, apparently).
So, the user could either: a. upload a custom .desktop file pointing to executable relative path, icon, etc. in a templated format, where some itch.io script would fill some {INSTALL_PATH} variable, and move the .desktop file to the right place b. (better) just upload metadata like executable relative path, icon, etc. (for Linux), and let itch.io generate the .desktop file completely and install it at the right place (less risk of bad .desktop files). itch.io is even capable of finding the executable path since we can Play directly from the itch.io desktop app, so probably only the icon would be needed.
If you are already working on this, what is the current state of development?