Last active
May 9, 2019 19:13
-
-
Save jwieringa/6720f89c3a435c32e5a144939dbbc0df to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 'at=lxd-config msg="Init LXD"' | |
cat <<EOF | sudo lxd init --preseed | |
config: | |
core.https_address: '[::]:8443' | |
core.trust_password: password | |
networks: | |
- config: | |
ipv4.address: auto | |
ipv6.address: auto | |
description: "" | |
managed: false | |
name: lxdbr0 | |
type: "" | |
storage_pools: | |
- config: | |
size: 15GB | |
description: "" | |
name: default | |
driver: btrfs | |
profiles: | |
- config: {} | |
description: "" | |
devices: | |
eth0: | |
name: eth0 | |
nictype: bridged | |
parent: lxdbr0 | |
type: nic | |
root: | |
path: / | |
pool: default | |
type: disk | |
name: default | |
cluster: null | |
EOF | |
echo 'at=display-setup msg="Install apt dependencies"' | |
sudo apt-get install \ | |
snapcraft \ | |
libgl1-mesa-dri \ | |
xwayland \ | |
mir-graphics-drivers-desktop \ | |
mir-demos \ | |
mesa-utils | |
echo 'at=snap-build msg="Create the snap"' | |
mkdir ~/glxgears-example | |
cat <<EOF > ~/glxgears-example/snapcraft.yaml | |
name: glxgears-example | |
version: 0.1 | |
summary: glxgears example kiosk | |
description: | | |
glxgears example X11 kiosk, using Xwayland and Wayland | |
confinement: classic | |
grade: devel | |
apps: | |
glxgears-example: | |
command: xwayland-kiosk-launch glxgears | |
environment: | |
XWAYLAND_FULLSCREEN_WINDOW_HINT: title="glxgears" | |
plugs: | |
- opengl | |
- wayland | |
parts: | |
glxgears: | |
plugin: nil | |
after: [ xwayland-kiosk-helper ] | |
stage-packages: | |
- mesa-utils | |
EOF | |
cd glxgears-example | |
snapcraft cleanbuild | |
# sudo su - root | |
# try this next | |
# sudo -H -u root miral-kiosk & | |
# miral-kiosk & | |
# sudo snap install --dangerous ./glxgears-kiosk_0.1_amd64.snap --devmode | |
# sudo snap run glxgears-kiosk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment