cassidyjames / ephemeral

A private-by-default, always-incognito browser for elementary OS
https://cassidyjames.com
GNU General Public License v3.0
154 stars 22 forks source link

Create elementary 6 AppCenter manifest #283

Open hanaral opened 3 years ago

hanaral commented 3 years ago

I've been trying to create one myself but cannot for the life of me figure out what's causing it to crash silently:

han@elementary-os-desktop-a67bc731:~/Documents/ephemeral-main$ flatpak run com.github.cassidyjames.ephemeral --g-fatal-warnings
Gtk-Message: 17:48:38.939: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:48:38.940: Failed to load module "canberra-gtk-module"

And here is the manifest I used to build:

app-id: com.github.cassidyjames.ephemeral
runtime: io.elementary.Platform
runtime-version: 'daily'
sdk: io.elementary.Sdk
command: com.github.cassidyjames.ephemeral
finish-args:
  - '--share=network'

  - '--share=ipc'
  - '--socket=fallback-x11'
  - '--socket=wayland'

  - '--talk-name=org.gtk.vfs.*'
  - '--talk-name=org.gnome.SettingsDaemon'
  - '--talk-name=org.elementary.Contractor'

  # - '--metadata=X-DConf=migrate-path=/com/github/cassidyjames/'
modules:
  # - name: handy
  #   buildsystem: meson
  #   sources:
  #     - type: git
  #       url: https://gitlab.gnome.org/GNOME/libhandy.git
  #       tag: '1.0.0'

  - name: libdazzle
    buildsystem: meson
    sources:
      - type: git
        url: https://gitlab.gnome.org/GNOME/libdazzle.git
        tag: '3.40.0'

  - name: ephemeral
    buildsystem: meson
    sources:
      - type: dir
        path: .

@cassidyjames would you be able to check what might be up if you have the time?

cassidyjames commented 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…

hanaral commented 3 years ago

@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?

sonnyp commented 3 years ago

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

cassidyjames commented 3 years ago

@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.

janxkoci commented 2 years ago

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:

Snímek z 2022-02-09 18 20 17

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.

cassidyjames commented 2 years ago

@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.

janxkoci commented 2 years ago

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.)