Dear Maintainer, According to the Hexchat FAQ [https://hexchat.readthedocs.io/en/latest/faq.html#how-do-i-change-what-browser-is-opened] in order to configure the file association for http and https links the user is directed to use the 'gio' utility. For example: gio mime x-scheme-handler/http firefox.desktop gio mime x-scheme-handler/https firefox.desktop For users of KDE these commands will not run successfully, and other methods of configuring http and https mimetype associations such as setting [Default Applications] in ~/.config/mimetypes.list or in ~/.local/share/applications/mimetypes.list also have no effect. Also note that the other two examples in the fact which use gvfs-mime will not work either in Bullseye because gvfs-mime is deprecated and points to gio. The end result is that it is not possible to configure the http and https mime type associations for Hexchat. Instead, Hexchat should use a destkop-environment-neutral mime mechanism such as xdg-mime.
Found the source of the issue with the gio command when running:
$ desktop-file-install --dir=$HOME/.local/share/applications
.local/share/applications/firefox.desktop
value "\\$HOME/.local/firefox/firefox %u" for key "Exec" in group
"Desktop Entry" contains a reserved character '$' outside of a quote
Adding quotes didn't help. The solution was to hard-code my home
directory in the Exec= line instead of using $HOME. Then the gio
command successfully runs:
$ gio mime x-scheme-handler/http firefox.desktop
Set firefox.desktop as the default for x-scheme-handler/http
$ gio mime x-scheme-handler/https firefox.desktop
Set firefox.desktop as the default for x-scheme-handler/https
$ gio mime x-scheme-handler/https
Default application for “x-scheme-handler/https”: firefox.desktop
Registered applications:
firefox.desktop
chromium.desktop
kfmclient_html.desktop
Recommended applications:
firefox.desktop
chromium.desktop
kfmclient_html.desktop