After trying to lock down Ubuntu desktop to make a kiosk, and failing, my research and the general concenseus lead me to believe that Ubuntu core running MIR kiosk is the proper way to do it. Well I have spent a week trying to get get chromium to run on ubuntu core at a specified url.
I am starting to think maybe the security of self contained snaps means I can’t make a snap that starts chromium? There are many tutorials on making snaps with like retro games, or spinning gears, but none on how to make a web kiosk, which I would imagine is the most common example use case. I am struggling with this, or to find an example. This makes me think its not possible at present?
Does one have to build chromium oneself so one can call it? Is it not possible to just call it as a command?
Any help or high level thoughts would be greatly appreciated.
Eventaully I would like to have a python flask app running on the device, and then start up chromium and point it at that flask url. The coding the flask app was easy, packaging is taking much longer, and harder to get right.
This is the
snapcraft.yaml file I have been working:
name: project-terminal version: '0.1' summary: Web Terminal test project description: Demo project to test if possible base: core20 confinement: classic # strict / classic / devmode grade: devel # Change from devel -> stable for release apps: project-terminal: # daemon: simple # restart-condition: always command-chain: - env-setup command: bin/run.sh # chromium --kiosk https://www.google.com architectures: - build-on: amd64 parts: project-terminal: plugin: dump stage-snaps: [mir-kiosk-x11, chromium] source: . # https://snapcraft.io/docs/defining-a-command organize: run.sh: bin/ # Needed by Mir and/or Xwayland layout: /usr/share/X11: bind: $SNAP/usr/share/X11 /usr/bin/xkbcomp: symlink: $SNAP/usr/bin/xkbcomp /usr/share/icons: bind: $SNAP/usr/share/icons /usr/share/fonts: bind: $SNAP/usr/share/fonts /etc/fonts: bind: $SNAP/etc/fonts plugs: opengl: # For Mir wayland: # For Mir network-bind: # For Mir (to serve X11)
usr/local/bin/x11_kiosk_launch chromium --kiosk https://www.google.com
And when it starts:
$ project-terminal ++ dirname /run/user/1000 + real_xdg_runtime_dir=/run/user + '[' '!' -O /run/user ']' ++ dirname /run/user + inotifywait --event create /run Setting up watches. Watches established.
… and nothing happens
Bonus question: Is there a way to make it save downloaded snaps when building, instead of redownloading the same snaps everytime it downloads?