Auto-connection for gnome-3-24 content interface


#61

I still don’t quite get on how I can use the gnome-3-26-1604 snap. Currently what I have in my snapcraft.yml is:

plugs:
  gnome-3-24-platform:
    interface: content
    target: gnome-platform
    default-provider: gnome-3-24:gnome-3-24-platform

I add the gnome-3-24-platform plug in the app section and also set after: [desktop-gnome-platform] in parts. Now if I just change the plug declaration to the gnome-3-26-1604 example above the snap will build, but on installation it still complains about the need to connect to gnome-3-24 since desktop-gnome-platform seems to rely on that.

Am I doing this wrong? Is there an updated version of desktop-gnome-platform needed or do I even need this at all?

In general I find it hard to find any info on this, the only thing having at least some documentation on using the content snap is https://wiki.ubuntu.com/snapcraft/parts, and even this is not very clear.


#62

@phw I believe the plug needs to look like this:

plugs:
  gnome-3-26-1604:
    interface: content
    content: gnome-3-26-1604
    default-provider: gnome-3-26-1604
    target: gnome-platform

Before it’s auto-connected, you can manually establish the interface with:

snap connect foo:gnome-3-26-1604 gnome-3-26-1604:gnome-3-26-1604

Once you push the snap to the store and install from there, that command is unnecessary as the connection will be automatically established.

@kenvandine Is the above right?


#63

That should be correct.


#64

Thanks, it actually works. I think I was just confused by the default error message when running without connection, which said it needed a connection to gnome-platform with the following error message:

You need to connect this snap to the gnome platform snap.

You can do this with those commands:
snap install gnome-3-24
snap connect peek:gnome-3-24-platform gnome-3-24:gnome-3-24-platform

#65

Ah, it changed indeed, for the reasons discussed in this topic.

@kenvandine @willcooke The message needs tuning.


#66

Also, for people to be able to easily install Peek on Ubuntu, there needs to be an Ubuntu Software GUI for installing platform snaps. At the moment if someone tries to install Peek from Ubuntu Software and then run it graphically (from Ubuntu Software or from the Dash) it simply won’t load.


#67

@Ads20000 This is being fixed already. The content interface has a default-provider attribute which will be automatically downloaded if the interface has no other local connection options.


#68

I’m not quite sure what you mean by that, bit too technical for me! But when is this being fixed, with the release of snapd 2.28 or is this perhaps fixed in revision 17 of the GNOME platform snap?


#69

The auto download based on the default provider will be in a future snapd. I’ve submitted a fix for the guide text to snapcraft-desktop-helpers.


Can a snap install another snap?
#70

@Ads2000 In practice it means you’ll be able to do just “snap install peek” and it will all work fine.


#71

Actually I think I get it, just took me a while to get my head round it: if there’s no other provider for the gnome-3-26-1604 content on the system then default-provider specifies where to get that content from and it’s downloaded and auto-connected. Sounds great!


#72

So I note that’s been committed to the GitHub repo for snapcraft-desktop-helpers, what’s the release process for that repo? :slight_smile:


#73

Don’t suppose you have a pointer to that piece of work? I just tried to install a snap (tetravex) on my artful system and it was a bit cryptic that it installed but I couldn’t launch it, because I had to install the platform snap and then connect it manually. The only place this was shown (that I could find) was in the journal.


#74

Fwiw, if you use the “edge” core snapd should download content snaps automaticall if the snap that needs them sets the “default-provider” in snap.yaml.


#75

@mvo Should this actually work now? I have installed gradio from @haeckerfelix which seems to be setup correctly, but it doesn’t auto-download the platform snap.


#76

that is still work in progress, not yet landed, so not even in edge


#77

Thanks. Do we have an ETA on it?


#78

It’s planned for 2.31, but that doesn’t have precise dates attached to it yet.


#79

Any update/ETA on this? The question keeps coming up for desktop snaps that require the gnome-3-26-1604 platform snap, and when not run from a terminal the apps fail to launch, completely silently, which makes for a bad user experience.


#80

The lack of auto-installation of platform snaps (or an easy-to-use GUI in software centers for doing so) was one of the reasons for @phw dropping Peek snaps :frowning: