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
Relate-to: https://github.com/scout208/x11kiosk/blob/master/snap/snapcraft.yaml
Relate-to: MirServer/xwayland-kiosk-helper#5
Signed-off-by: Philippe Coval <[email protected]>
  • Loading branch information
rzr committed Mar 10, 2021
1 parent 2cf87b6 commit fcf50ad
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 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,21 @@ 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 --fullscreen

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 +101,17 @@ parts:
- libxrender1
- libxss1
- libxxf86vm1

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

0 comments on commit fcf50ad

Please sign in to comment.