beakerbrowser / beaker

An experimental peer-to-peer Web browser
https://beakerbrowser.com/
MIT License
6.75k stars 546 forks source link

[Linux] Application icon doesn't exist #1529

Open ghost opened 4 years ago

ghost commented 4 years ago

Operation System: elementary OS 5.1.2 hera (x86_64 Linux 5.3.0-42-generic)

Beaker version: 0.8.10

When installing Beaker on Linux, all you get is an AppImage without any metadata. Thus, it becomes a hassle to actually open the application, as it does not appear with any other application in whatever desktop environment you're using (requiring you to navigate to the AppImage file and execute it).

The solution would be to create a file in /usr/share/applications when the browser is run, called beaker-browser.desktop with contents similar to:

[Desktop Entry]
Name=Beaker Browser
Comment=An experimental peer-to-peer Web browser
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
GenericName=Web Browser
Exec=/path/to/Beaker.Browser-0.8.10.AppImage %U
StartupNotify=true
Terminal=false
Icon=/path/to/1024x1024.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Actions=new-window;

[Desktop Action new-window]
Name=New Window
Exec=/path/to/Beaker.Browser-0.8.10.AppImage

Now, for this to be feasible, Beaker would also have to come with its icon (or download it on first run), and it would have to be able to find its own running directory so it could tell the desktop environment where it is through the beaker-browser.desktop file. It would also be preferable for this file to update on every run, just in case the path to the AppImage changes in any way. Such an instance where this could occur would be with autoupdating (though, surprisingly, this is still not implemented on Linux despite appearing on both Windows and macOS).

ghost commented 4 years ago

Should official distribution switch over to flatpak or snap (see #1530), this problem is largely resolved, though the categories, MimeType, and new-window action do not appear to exist when installed through those packages. But, it does still have an icon you can click, which is the main point.