Expose ubuntu-frame screenshot to other snap

Hello, we would like to use the screenshot command from Ubuntu Frame to capture the screen of our device (Ubuntu Core-based, custom image), which we will use for remote diagnosis purposes.

What I have seen that from implementation, images are saved into SNAP_USER_COMMON for the ubuntu-frame mount namespace. (ubuntu-frame/scripts/bin/screenshot at main · canonical/ubuntu-frame · GitHub).

There is no way for other snaps to access those images and use it(upload them to a cloud storage), as far as i am aware.

Do you guys think it would be possible to make a content interface and expose those screenshots over there? If so, how can we make a feature request?

Since you guys (@alan_g @Saviq ) are working on the frame, any input would be appreciated .

Thanks

1 Like

Hi @aliihsan hey, how would you invoke ubuntu-frame.screenshot, though?

Our preferred approach here would be that you capture the screen through the Wayland socket (basically include a Wayland screenshotting tool in your snap), but caveat there is that you’d need to enable the right protocol.

There’s some discussion of how to do it, here - but that opens it up for all snaps connected to the socket, so make sure you only do this if you trust them all:

We do have a feature planned for tighter control, but it’s not made its way onto the nearest roadmaps: Allow privileged snaps to access sensitive protocols · Issue #201 · canonical/ubuntu-frame · GitHub.

Hope this helps.

1 Like

I was thinking of triggering this command over snapd, and getting the result from somewhere.

Guess not only the config will be enough, but we may need to connect the interfaces below with the consumer snap to access the Wayland socket.

    plugs:
      - opengl (Not sure its needed)
      - wayplug

Thanks

1 Like