Open hanaral opened 3 years ago
I am going to need to rethink how Ephemeral works pretty fundamentally in a Flatpak; I won’t be able to see what other browsers are installed, so the browser button will be useless. Instead I think I will need a generic “open externally” button, as long as there is some portal or DBus call I can use to do that and have the system present a list of compatible apps…
@cassidyjames I'm pretty sure you could come up with a unique icon and then just set it to 'open with default browser', isn't there already an xdg open for browsers anyway?
I won’t be able to see what other browsers are installed
It's possible in flatpak, including with GDesktopAppInfo
, but requires some trickery that you might not want to do.
See https://github.com/flathub/com.github.donadigo.appeditor and https://github.com/sonnyp/Junction/pull/1/files
@hanaral the problem is Ephemeral is expected to be the default browser. :wink: It does sound like I can specifically use the open URI portal and ask the user to be prompted for the URI. I'll have to see if that will work.
I have at least one flatpak app - qBittorrent - that offers me a GNOME-looking list of compatible apps to open downloaded files. I always thought the list is a flatpak portal. Could you use something like that?
Here is a pic:
BTW: two of the video players in the pic are from Ubuntu repos (elementary Videos and mpv) and the other two are from flathub, so it can clearly detect and show both formats.
@janxkoci yep, this is provided by the app chooser portal. The problem is that currently Ephemeral queries and uses information from installed apps within the app itself to provide features, which afaik the portal does not allow (it just lets the app say, "I want to open this in an app and the portal shows the UI or decides which app to use). I will need to re-design and likely remove some features to make it useful in a contained Flatpak.
Oh, I get how it works (on the surface), I just hoped to see something like that instead of whatever this is:
ask the user to be prompted for the URI.
Maybe it's not bad, but it sounded scary :sweat_smile: Anyway, having a button which opens the portal (or the only other browser, if there is just one) will probably be fine for most people. Unless the portal will also list Ephemeral, that could be weird :smile:
And which features do you need to drop? I can only see two options in the browser picker:
I can see the second one could be a problem, but the first one should be able to stay. Or is it more complicated? (I don't know much about portals.)
I've been trying to create one myself but cannot for the life of me figure out what's causing it to crash silently:
And here is the manifest I used to build:
@cassidyjames would you be able to check what might be up if you have the time?