Skip to content

Commit

Permalink
snap: Support x11kiosk for ubuntu core
Browse files Browse the repository at this point in the history
snap maybe be restarted to show up

This could be improved with GLES port to drop GLX dep
and then xwayland to use SDL2's wayland backend.

cmake trick might be fixed upstream too

Change-Id: Iced9c4f250254b78ce8ae12c295ecb21c0133c8f
Relate-to: #21
Signed-off-by: Philippe Coval <[email protected]>
  • Loading branch information
rzr committed Mar 10, 2021
1 parent 2cf87b6 commit 34aaa36
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ license: GPL-2.0+
plugs:
alsa:
audio-playback:
network-bind: # Mir/Xwayland
opengl:
pulseaudio:
wayland:
Expand All @@ -22,16 +23,26 @@ plugs:
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio"
LIBGL_DRIVERS_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri"
XWAYLAND_FULLSCREEN_WINDOW_HINT: title="pinball"

apps:
pinball:
command: usr/local/bin/pinball
xwayland-kiosk-pinball:
command: usr/local/bin/xwayland-kiosk-launch pinball
daemon:
command-chain:
- bin/run-daemon
command: usr/local/bin/xwayland-kiosk-launch pinball --fullscreen
daemon: simple

layout:
/usr/local:
bind: $SNAP/usr/local
/usr/share/alsa:
bind: $SNAP/usr/share/alsa
/usr/share/X11:
bind: $SNAP/usr/share/X11

parts:
pinball:
Expand Down Expand Up @@ -95,3 +106,17 @@ parts:
- libxrender1
- libxss1
- libxxf86vm1

xwayland-kiosk-helper:
plugin: cmake
source: https://github.com/MirServer/xwayland-kiosk-helper.git
override-stage: |
snapcraftctl stage
sed -i 's|/lib/libxwayland-preload.so|/usr/local/lib/libxwayland-preload.so|g' usr/local/bin/xwayland-kiosk-launch
build-packages:
- build-essential
stage-packages:
- i3
- libegl1-mesa
- libgl1-mesa-glx
- xwayland

0 comments on commit 34aaa36

Please sign in to comment.