Snaps to develop a Web kiosk on Ubuntu Core (using Wayland)

@greyback, on a 18.04 “classic” laptop I’ve tried installing mir-kiosk with --devmode:

$ sudo snap install --devmode mir-kiosk
mir-kiosk 1.2.0-snap83 from Canonical✓ installed

And installing chromium-mir-kiosk, connecting the wayland interface and restarting:

$ sudo snap install --edge chromium-mir-kiosk
chromium-mir-kiosk (edge) 74.0.3729.169 from Gerry Boland (gerboland) installed
$ sudo snap connect chromium-mir-kiosk:wayland mir-kiosk:wayland
$ sudo snap restart chromium-mir-kiosk

It works.

@fractalsynapse: I know this isn’t a “classic” image on RPi, but these steps ought to work on any classic system. Could you confirm that this is what you’re doing? (It can take quite a while for chromium to start on the RPi A bit of sudo snap logs chromium-mir-kiosk can reassure that nothing has broken.)

Also, why would you want to use a “Classic” image? Core is much better suited for most “kiosk” deployments.

@greyback @saviq I would love to use just snappy core but I am in a bit of a time jam. My app uses a mysql-server and tomcat contatiner to serve up to a LAN/WAN. The kiosk part of the display is part of the device info display and serves as a maintenance menu / dashboard.

Since I have all the devops automated for all the apt-get installs and config my app, I had to determine if it was faster for me to figure out how to snap mysqld and tomcat or simply get mir working with chromium on a classic install *rpi that allows apt installs for my server packages.

Snappy Core is my endgame because of the management and security, I am effectively IoT but my uses case is a bit more advanced than just a kiosk.

Yesterday I realized that the mir-kiosk was not actually running on the classic even though I moved ahead to the chromium. I deduced this by the fact the display server did not flash to orange and yield a mouse cursor.

The most promising progress I made so far was:

Ubuntu Mate on rpi3b+ , I went into the raspi-config and enabled the GL driver, installed the stable mir-kiosk and the screen flashed orange , went to the proper state of waiting for a client to connect.

I then proceeded to snap install the mir-kiosk-apps in beta & devmode and the chromium for testing, none of them popped up on the screen.

here is the output from starting the kiosk app

Jun 11 10:36:48 orbital-node systemd[1]: Started Service for snap application mir-kiosk-apps.mir-kiosk-app-daemon.
Jun 11 10:36:48 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: Running rssnews
Jun 11 10:36:48 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: Setting up watches.
Jun 11 10:36:48 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: Watches established.
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: QStandardPaths: XDG_RUNTIME_DIR points to non-existing path ‘/run/user/0’, please create it with 0700 permissions.
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: Failed to create display (No such file or directory)
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: /snap/mir-kiosk-apps/53/bin/mir-kiosk-app-daemon: line 38: 32753 Terminated $SNAP/usr/bin/inotifywait -e modify ${CONFIG_FILE}
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: Shutting down rssnews (pid: 32752)
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: /snap/mir-kiosk-apps/53/bin/mir-kiosk-app-daemon: line 43: kill: (32752) - No such process
Jun 11 10:36:49 orbital-node mir-kiosk-apps.mir-kiosk-app-daemon[32734]: rssnews was already dead!
Jun 11 10:36:49 orbital-node systemd[1]: snap.mir-kiosk-apps.mir-kiosk-app-daemon.service: Main process exited, code=exited, status=1/FAILURE
Jun 11 10:36:49 orbital-node systemd[1]: snap.mir-kiosk-apps.mir-kiosk-app-daemon.service: Failed with result ‘exit-code’.

So stepping this back and restarting mir-kiosk yields something interesting in logs of with journalctl.

Jun 11 10:39:42 orbital-node systemd[1]: Started Service for snap application mir-kiosk.mir-kiosk.
Jun 11 10:39:43 orbital-node audit[536]: AVC apparmor=“DENIED” operation=“mkdir” profile=“snap.mir-kiosk.mir-kiosk” name="/run/user/0/" pid=536 comm=“mkdir” requested_mask=“c” denied_mask=“c” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: mkdir: cannot create directory ‘/run/user/0’: Permission denied
Jun 11 10:39:43 orbital-node kernel: kauditd_printk_skb: 4 callbacks suppressed
Jun 11 10:39:43 orbital-node kernel: audit: type=1400 audit(1560271183.541:80): apparmor=“DENIED” operation=“mkdir” profile=“snap.mir-kiosk.mir-kiosk” name="/run/user/0/" pid=536 comm=“mkdir” requested_mask=“c” denied_mask=“c” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.689458] mirserver: Starting
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.692883] < - debug - > mirserver: Using Linux VT subsystem for session management
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.694175] mircommon: Loading modules from: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.694676] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-mesa-kms.so.16
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.695008] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/server-mesa-x11.so.16
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.695161] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/input-evdev.so.7
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.713230] mesa-kms: EGL platform does not support EGL_KHR_platform_gbm extension
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.714911] < -warning- > mesa-kms: Failed to detect whether device /dev/dri/card0 supports KMS, continuing with lower confidence
Jun 11 10:39:43 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node kernel: audit: type=1400 audit(1560271183.949:81): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node kernel: audit: type=1400 audit(1560271183.957:82): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:43 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.999275] mirplatform: Found graphics driver: mir:mesa-kms (version 1.2.0) Support priority: 128
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:43.999835] mirplatform: Found graphics driver: mir:mesa-x11 (version 1.2.0) Support priority: 0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.001590] mirserver: Selected driver: mir:mesa-kms (version 1.2.0)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.005562] < -warning- > mesa-kms: Failed to detect whether device /dev/dri/card0 supports KMS, but continuing anyway
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.005808] mesa-kms: Using DRM device /dev/dri/card0
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.025:83): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.029:84): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.116836] < -warning- > mesa-kms: Unable to determine the current display mode.
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.117136] < -warning- > mesa-kms: Unable to determine the current display mode.
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.124734] mesa-kms: DRM device details:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.125066] mesa-kms: /dev/dri/card0: using driver vc4 [Broadcom VC4 graphics] (version: 0.0.0 driver date: 20140616)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165017] mesa-kms: Output: HDMI-A-1 (connected)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165226] mesa-kms: Mode: 1920×1080@60.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165303] mesa-kms: Mode: 1920×1080@59.94
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165366] mesa-kms: Mode: 1920×1080@30.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165428] mesa-kms: Mode: 1920×1080@29.97
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165491] mesa-kms: Mode: 1920×1080@24.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165553] mesa-kms: Mode: 1920×1080@23.97
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165615] mesa-kms: Mode: 1280×1024@60.01
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165678] mesa-kms: Mode: 1280×720@60.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165753] mesa-kms: Mode: 1280×720@59.94
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165816] mesa-kms: Mode: 1024×768@60.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165881] mesa-kms: Mode: 1440×480@29.97
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.165943] mesa-kms: Mode: 800×600@60.31
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166010] mesa-kms: Mode: 720×480@60.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166071] mesa-kms: Mode: 720×480@59.94
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166133] mesa-kms: Mode: 720×480@30.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166194] mesa-kms: Mode: 720×480@29.97
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166258] mesa-kms: Mode: 640×480@60.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166330] mesa-kms: Mode: 640×480@59.94
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166566] mesa-kms: Output: Composite-1 (UNKNOWN)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166645] mesa-kms: Mode: 720×480@31.34
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.166775] < - debug - > miral: Display config using layout: ‘default’
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.167477] miral: Display config:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: 8>< ---------------------------------------------------
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: layouts:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # keys here are layout labels (used for atomically switching between them)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # when enabling displays, surfaces should be matched in reverse recency order
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: default: # the default layout
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: cards:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # a list of cards (currently matched by card-id)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: - card-id: 0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: HDMI-A-1:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # This output supports the following modes: 1920x1080@60.0, 1920x1080@59.9,
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # 1920x1080@30.0, 1920x1080@30.0, 1920x1080@24.0, 1920x1080@24.0, 1280x1024@60.0,
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # 1280x720@60.0, 1280x720@59.9, 1024x768@60.0, 1440x480@30.0, 800x600@60.3,
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # 720x480@60.0, 720x480@59.9, 720x480@30.0, 720x480@30.0, 640x480@60.0,
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # 640x480@59.9
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: #
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # Uncomment the following to enforce the selected configuration.
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # Or amend as desired.
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: #
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # state: enabled # {enabled, disabled}, defaults to enabled
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # mode: 1920x1080@60.0 # Defaults to preferred mode
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # position: [0, 0] # Defaults to [0, 0]
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # orientation: normal # {normal, left, right, inverted}, defaults to normal
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: Composite-1:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: # (disconnected)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: 8>< ---------------------------------------------------
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.208214] < -warning- > mesa-kms: drmModeCrtcSetGamma failed: Invalid argument
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.231965] mesa-kms: Detected single-GPU DisplayBuffer. Rendering will be sent directly to output
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.249:85): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.253:86): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.261:87): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node audit[424]: AVC apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.270940] mirserver: Using hardware cursor
Jun 11 10:39:44 orbital-node kernel: audit: type=1400 audit(1560271184.265:88): apparmor=“DENIED” operation=“open” profile=“snap.mir-kiosk.mir-kiosk” name="/etc/drirc" pid=424 comm=“miral-kiosk” requested_mask=“r” denied_mask=“r” fsuid=0 ouid=0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.332806] mircommon: Loading modules from: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.333367] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/graphics-mesa-kms.so.16
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.333887] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/server-mesa-x11.so.16
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.334195] mircommon: Loading module: /snap/mir-kiosk/1538/usr/lib/aarch64-linux-gnu/mir/server-platform/input-evdev.so.7
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.452122] mirserver: Selected input driver: mir:evdev-input (version: 1.2.0)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.453870] mesa-buffer-allocator: Bound WaylandAllocator display
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.454112] < -warning- > mirserver: Cannot set Wayland protocol filter: wl_display_set_global_filter() is unavailable in libwayland-dev 1.12.0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-0.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-1.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-2.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-3.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-4.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-5.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-6.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-7.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-8.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-9.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-10.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-11.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-12.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-13.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-14.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-15.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-16.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-17.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-18.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-19.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-20.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-21.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-22.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-23.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-24.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-25.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-26.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-27.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-28.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-29.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-30.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-31.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: unable to open lockfile /run/user/0/wayland-32.lock check permissions
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.457842] mirserver: Mir version 1.2.0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.572967] GLRenderer: EGL vendor: Mesa Project
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573250] GLRenderer: EGL version: 1.4 (DRI2)
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573324] GLRenderer: EGL client APIs: OpenGL OpenGL_ES
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573423] GLRenderer: GL vendor: Broadcom
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573490] GLRenderer: GL renderer: VC4 V3D 2.1
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573546] GLRenderer: GL version: OpenGL ES 2.0 Mesa 18.0.5
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573601] GLRenderer: GLSL version: OpenGL ES GLSL ES 1.0.16
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573683] GLRenderer: GL max texture size = 2048
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.573778] GLRenderer: GL framebuffer bits: RGBA=8880, depth=0, stencil=0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668175] mirserver: Initial display configuration:
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668400] mirserver: * Output 1: HDMI-A connected, used
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668495] mirserver: . |_ EDID monitor name: SONY TV
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668566] mirserver: . |_ EDID manufacturer: SNY
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668637] mirserver: . |_ EDID product code: 62209
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668744] mirserver: . |_ Physical size 72.3" 1600x900mm
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668811] mirserver: . |_ Power is on
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.668887] mirserver: . |_ Current mode 1920x1080 60.00Hz
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669013] mirserver: . |_ Preferred mode 1920x1080 60.00Hz
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669084] mirserver: . |_ Orientation normal
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669167] mirserver: . |_ Logical size 1920x1080
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669243] mirserver: . |_ Logical position +0+0
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669307] mirserver: . |_ Scaling factor: 1.00
Jun 11 10:39:44 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:44.669368] mirserver: * Output 2: Composite disconnected
Jun 11 10:39:47 orbital-node mir-kiosk.mir-kiosk[424]: [2019-06-11 16:39:47.005253] < -warning- > mirserver: Attempt to read from WlShmBuffer after the wl_buffer has been destroyed

Note that I switched to Ubuntu Mate because it seemed to have a closer build to the actual hardware which appears true. I will run the other tests you asked for on the other class distro and post the results. I do not need a GUI / Desktop so getting this working on Ubuntu Server ARM64 18.04.02 would be the best outcome for me.

@alan_g I will give your recipe a go this morning and post the results. I am very determined to make this work. It seems there is not much standing in the way.

Ok the power of a good night of sleep :slight_smile: I got it working

Ubuntu Mate RPI3B+ :

  • GL enabled through raspi-config
  • mir-kiosk devmode
  • mir-kiosk-apps beta devmode

I still need to test chromium but now we know wayland is happening. I have the RSS feed displaying.

Neil

This is possible with maim. Here is my snap/snapcraft.yaml to create a snap:

name: maim
base: core18
version: "5.4.68-1.1"
summary: DOSBox
description: |
  maim - takes screenshots of your desktop

confinement: devmode

apps:
  maim:
    command: maim
    plugs:
      - x11-plug
    slots:
      - x11

parts:
  maim:
    plugin: nil
    stage-packages:
      - maim

plugs:
  x11-plug: # because cannot have identical plug/slot name in same yaml.
    interface: x11

With maim installed I’ll take a screenshot with

sudo DISPLAY=:`pgrep --list-full Xwayland | cut -d: -f2` maim -g 1080x1080+0+0

As described above there is a problem with the portrait mode and currently I am only able to take a screenshot in this size, even if the screen is 1080 x 1920.

@greyback I want to give this a try, and I was checking the source code of the chromium-mir-kiosk, which I understand is here:

In the code the chromium version is still 72.x, but on the store the latest available version is 76.x:

$ snap info chromium-mir-kiosk
name:      chromium-mir-kiosk
...
channels:
  stable:    –                                   
  candidate: –                                   
  beta:      69.0.3497.100 2018-09-26 (35) 163MB -
  edge:      76.0.3809.100 2019-08-20 (64) 174MB -

So I was guessing, where is the latest code for the snap?

Thanks!

@pachulo
Source is here: https://git.launchpad.net/~mir-team/+git/chromium-mir-kiosk?h=master
but it hasn’t been touched in some time, so I’ve no idea if it will build. We’re not developing it any further, and instead pointing people at https://snapcraft.io/wpe-webkit-mir-kiosk
Thanks
-G

Well, the latest snap from the edge channel is from yesterday, so I guess that it builds OK.

I’ve read about this, but for a kiosk running a browser and an app that does not need any graphics accelerated by hardware, it made more sense to have a Chromium browser with this kiosk extension, at least from what I’ve read so far…

I guess that this also means that you are not gonna update this anymore, isn’t it?

Thanks again!

I’d be surprised if wpe-webkit doesn’t work on hardware without a GPU. It is lighter so might be more performant…

Kiosk extension can indeed work with chromium (that’s what chromium-mir-kiosk has built-in), but I found it hard to trust the extension system to make a fully secure kiosk - as in, I often found ways to break out of the kiosk to get a fully chromed webbrowser. IMO it would be safer to just use something that gives you a simple webview, which you can add whatever kiosk-y features you need on top.

Nope, we’re not planning on developing chromium-mir-kiosk further.
-G

1 Like

Yeah, I’m sure that it should perform better for graphic applications, but I’m interested in raw JavaScript performance, and my experience tells me that V8, which Chromium uses, is one of the best.
I guess I will have to find out if JavaScriptCore, which I understand WPE also uses, is as good.

This is great information! :grinning: Thanks a lot!

sigh

I realize chromium-mir-kiosk was offered as a proof of concept. People weren’t supposed to use it but rather build their own. But this is Ubuntu where the goal is to lower the barrier to entry. And chromium-mir-kiosk works. It didn’t require figuring out all the nitty-gritty of snaps and wayland and X11 and on and on to make a kiosk. I’m disappointed that it has been abandoned.

Things always change but it would be really nice if tools being created for people who are making these sorts of unattended systems were a bit more stable. At least make sure that before switching things up, the new solution at least has a way to do everything the old one does and a path to get there. For example, wpe-webkit-mir-kiosk does not appear to have the same options that chromium-mir-kiosk did. resettime, hidecursor, multiple urls, etc. Not to mention that using a different rendering engine has implications for development, testing, and performance. I can run chromium and be pretty confident that APIs, CSS, and rendering will be the same and JS performance will be good. What should I run on my desktop to mimic wpe-webkit-mir-kiosk?

The snap system and ubuntu core sell themselves on low-maintenance, deploy and forget use cases. But if every year snap app developers are going to jump on some new thing and abandon users who took them up on previous stuff, then it isn’t stable at all. If I were a competent Linux app developer with time on my hands, I wouldn’t need snaps. As a researcher in a completely different field trying to cobble something together, snaps are fantastic (when they work consistently.)

Anyway, there are my two cents. I will spend some time and see if I can sort out how to maintain chromium-mir-kiosk myself. If I am successful, I’ll let people know.

Don’t sigh

A lot of software developed to prove a concept never reaches the status of being a supported product. There can be many reasons for this: Maybe the concept is flawed and there are insurmountable technical issues, maybe a better alternative is found, or maybe the hoped for value isn’t realized.

In the closed source world you rarely see the many projects that don’t make it to “product”, in the FOSS world you’ll see many that don’t get that far. That should be seen as an advantage of FOSS, not a disappointment.

If these projects work well enough for you, you can use them. If they don’t work well enough for you then you can benefit from them by fixing them yourself or motivating someone with the necessary skills to do it. If even that is impossible you may be inspired to do something better.

As for chromium-mir-kiosk: We know people are using it and, because of that, haven’t removed it from the store. But, as a result of our work on chromium-mir-kiosk, we identified a number of technical issues that we could not have predicted beforehand. Fortunately our work inspired something similar that has fewer problems: wpe-webkit-mir-kiosk.

I realise that it is unlikely for “a researcher in a completely different field”, but you want to approach Canonical on a commercial basis, they would likely be willing to revive the project. (To do a good job, that would require funding at least one developer.) Similarly, If you want to take over chromium-mir-kiosk yourself, that’s FOSS (but, in practice, I think you’ll reach the same conclusion we did).

Please see the good in having all these options!

As for testing on your desktop:

https://discourse.ubuntu.com/t/howto-run-your-kiosk-snap-on-your-desktop/11180/

6 Likes

Hi There! hidecursor=true is not working

I believe this to be this (resolved) issue?

https://github.com/MirServer/mir-kiosk/issues/30

Hello guys. I would like to kindly ask you - is it possible to boot directly into mir-kiosk with preferable snap started? Ubuntu / Ubuntu Core? I’m trying to build a plug-n-play solution and can’t find any information on this usecase in forums nor documentation.

In other words - I’m able to start mir-kiosk from terminal and also to start a snap - but is it possible to start this session at boot/reboot, without login, ubuntu loading screen, etc, and jump right into mir-kiosk?

Thank you very much for your patience and help. All the best, Tomas

You’re looking at the wrong thread. Try here:

https://discourse.ubuntu.com/t/configuring-mir-kiosk-a-masterclass/8150

How about:

https://ograblog.wordpress.com/2019/01/07/291/

I’m the developer of the previously mentioned kiosk app. Found this thread since I’m in the initial stages of doing this exact work: moving over the functionality from the existing Chrome App into a proper snap and primarily starting to focus on ubuntu core instead of Chrome OS.

Hey @lookitscook, welcome aboard :slight_smile:

Let us know if you need any help - here is fine, or we’re in #mir-server on Freenode.

2 posts were split to a new topic: Mir-kiosk on Raspberry Pi 4