sonnyp / Junction

Application/browser chooser
https://flathub.org/apps/re.sonny.Junction
GNU General Public License v3.0
457 stars 29 forks source link

Does not detect Waterfox as a browser alternative #62

Closed johnnyasantoss closed 2 years ago

johnnyasantoss commented 2 years ago

I'm running Manjaro and using Waterfox as my main browser. I've installed it using waterfox-g4-bin AUR package, and somehow Junction can't suggest it to open http(s) links.

How is exactly that junction searches for a protocol handler? I thought that it would be using the MimeType from the .desktop, but Waterfox has it defined correctly (at least it seems to me).

waterfox-g4.desktop without the translations for brevity.

[Desktop Entry]
Version=1.0
Name=Waterfox G4
Comment=Browse the World Wide Web
GenericName=Web Browser
Keywords=Internet;WWW;Browser;Web;Explorer;
Exec=waterfox-g4 %u
Terminal=false
X-MuiltpleArgs=false
Type=Application
Icon=waterfox-g4
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;ProfileManagerWindow;

[Desktop Action NewWindow]
Name=Open a New Window
Exec=waterfox-g4 --new-window

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=waterfox-g4 --private-window

[Desktop Action ProfileManagerWindow]
Name=Open the Profile Manager
Exec=waterfox-g4 --ProfileManager

Am I missing something? Is there anything else that I have to add to .desktop? Or is it some other config that needs to be set?

johnnyasantoss commented 2 years ago

Oh, forgot to add. Even when I select 'More', type in waterfox and open with it manually, it still doesn't show as an alternative. I intuitively thought that manually selecting a program would make it show as an alternative next time I would try to open the same type of file or protocol.

sonnyp commented 2 years ago

Please share content of Junction -> Menu -> About Junction -> System

And make sure to read https://github.com/sonnyp/Junction#troubleshooting carefully

johnnyasantoss commented 2 years ago

Please share content of Junction -> Menu -> About Junction -> System

Junction:
version 1.5.0
programInvocationName /app/bin/re.sonny.Junction
argv --gapplication-service
cwd /home/johnny
datadir /app/share

Powered by:
GJS 1.70.0
libadwaita 1.0.0
GTK 4.4.1
GLib 2.70.2
flatpak 1.12.3

Environment:
OS Manjaro Linux 
$XDG_DATA_DIRS /app/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share:/run/host/usr/share:/var/lib/snapd/desktop:/var/lib/flatpak/exports/share:/home/johnny/.local/share/flatpak/exports/share
$PATH /app/bin:/usr/bin
$FLATPAK_ID re.sonny.Junction
$XDG_CURRENT_DESKTOP GNOME
$XDG_SESSION_TYPE x11

And make sure to read https://github.com/sonnyp/Junction#troubleshooting carefully

I've read and the only mimetype missing is text/mml;, but I think it has nothing to do with x-scheme-handler/https (which Waterfox has - as shown in the issue description)

johnnyasantoss commented 2 years ago

I've edited the .desktop file with menu-libre and it removed the translations and updated the version of the .desktop file to 1.1, and somehow now it works.

Probably there's an issue parsing special characters from the translation values

johnnyasantoss commented 2 years ago

Original file: https://aur.archlinux.org/cgit/aur.git/tree/waterfox-g4.desktop?h=waterfox-g4-bin

sonnyp commented 2 years ago

Junction only shows 4 applications – do you have more than 4 browsers? If so – it's normal that one of them doesn't show.

Anyway, Junction use Gio.AppInfo.get_recommended_for_type