I’ve been looking but unable to find documentation around what needs to be done to package a wayland compositor, in this case Sway.
First question would be simply is it possible and does it make sense to do?
I thought it seemed like the simplest way to package sway since it depends on some packages that don’t exist in Ubuntu 18.10 even, like json-c 0.13.
Building a snap for it works just fine but running it is where I’m unclear how to move forward. Even in devmode I get an error that the DRM device can not be found. I thought I’d at least be able to run it in devmode and then move forward with figuring out how to define the required privileges to run something like a wayland compositor from a snap.
I know there is a snap wayland interface, so the sway snap should provide that interface? I’m unclear on how that is supposed to be done.
I thought this (using the slots and plugs from mir-kiosk) had solved it, I was able to run sway, but now after upgrading to snapcraft 3.0 to do a clean build on a VM for core18 and trying to run the installed snap I’m again getting:
The (hopefully temporary) approach I’ve taken with snapping egmde is making it a “classic” snap. That has the unfortunate side-effect that it only works on 18.04LTS.
I still have to dig in more but wanted to mention that I’ve now tried classic confinement as well and it actually core dumps when I try to run sway after installing the snap.
You may already know this, but with “classic” things get very fragile unless the build environment, base and runtime environment match up. For example, build on 18.04, core18 & run on 18.04 is a working combination.
classic also limits you to classic systems (server/desktop) where you typically already have a working non-snap compositor available … the use-case of running a kiosk app on top of your compositor under Ubuntu Core will not be possible with a classic snap …