Another iteration
I’ve addressed some of the discussion above.
My hacked version of snapd now adds io.snapcraft.Launcher.OpenDesktopEntry
, io.snapcraft.Launcher.OpenDesktopEntryEnv
access to /var/lib/snapd/desktop/applications
to a new shell-support
interface.
As currently coded, the shell-support
interface auto-connects. I’d expect it be be flagged for manual review for uploads to the store.
I’ve also updated the branched egmde to use this and created a version of the egmde-confined-desktop snap. This can no longer be pushed to the snap store (because “unknown interface ‘shell-support’”).
With all these installed it is possible to launch Wayland based snaps from the confined desktop.
Current status
The main technical features missing here are parsing the .desktop file correctly, adding support for exec variables and desktop actions defined in the .desktop file.
Known limitations
- None of this works on Ubuntu Core as there’s no userd.
Play along instructions
If you want to experiment, here are the steps to reproduce what I’ve done so far.
Start with an X11 based desktop. (A Wayland based desktop will confuse things.)
Checkout the https://github.com/MirServer/snapd/tree/open-desktop-entry
branch and run the script listed above. (This replaces the affected binaries and waits for <enter> before restoring the system.)
Install mir-kiosk-kodi as a test application:
snap install mir-kiosk-kodi
/snap/mir-kiosk-kodi/current/bin/kodi-connect.sh
Checkout and build the test version of the egmde-confined-desktop snap (this picks up the corresponding egmde branch), install and run it:
git clone https://github.com/MirServer/egmde-confined-desktop.git
cd egmde-confined-desktop
git checkout open-desktop-entry
snapcraft && snap install --dangerous *.snap
/snap/egmde-confined-desktop/current/bin/setup.sh
egmde-confined-desktop
Egmde will appear in a “Mir-on-X” window and can launch the kodi snap via userd.