Skip to content
This repository has been archived by the owner on Apr 2, 2022. It is now read-only.

Create elementary 6 AppCenter manifest #283

Open
hanaral opened this issue May 24, 2021 · 7 comments
Open

Create elementary 6 AppCenter manifest #283

hanaral opened this issue May 24, 2021 · 7 comments

Comments

@hanaral
Copy link

hanaral commented May 24, 2021

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
Copy link
Owner

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
Copy link
Author

hanaral commented May 25, 2021

@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
Copy link

sonnyp commented Jun 22, 2021

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
Copy link
Owner

@hanaral the problem is Ephemeral is expected to be the default browser. 😉 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
Copy link

janxkoci commented Feb 9, 2022

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
Copy link
Owner

cassidyjames commented Feb 9, 2022

@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
Copy link

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 😅 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 😄

And which features do you need to drop? I can only see two options in the browser picker:

  • "Automatically open this site externally"
  • "Close window when opening externally"

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants