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

Was trying on stable. Tried the edge and it is working now.
Any idea on when would this work on a stable version.

I just followed the article and chromium-mir-kiosk does not seem have the wayland-socket-dir plug.

@om26er - yes things have been moving around a little as I’ve been polishing the implementation.

To get a reliably working chromium-mir-kiosk today, you should

  1. Install stable mir-kiosk
  2. Install chromium-mir-kiosk from the beta channel.

I’ll make sure beta is always functional with the stable mir-kiosk.
-G

EDIT: original post has been updated with correct commands.

1 Like

Hi, I have the same problem. I tried installing chromium-mir-kiosk from beta channel, but it seems like there is only edge channel available. I got this error:

command: snap install --beta chromium-mir-kiosk --devmode
error: snap “chromium-mir-kiosk” not found (at least in channel “beta”)

Installing with edge i got this error:
command: snap install --edge chromium-mir-kiosk --devmode
INFO snap “chromium-mir-kiosk” has bad plugs or slots: x11
(x11 slots are reserved for the core snap)
chromium-mir-kiosk (edge) 68.0.3440.84 from ‘gerboland’ installed

and

command: snap connect chromium-mir-kiosk:wayland-socket-dir mir-kiosk:wayland-socket-dir
error: snap “chromium-mir-kiosk” has no plug named “wayland-socket-dir”

I have a older installation and it still works even with the latest versions, but I cannot make a new installtion without getting these errors.

-Juuso-

Don’t know if it’s related, but snapcraft.io have been a bit sketchy lately. https://status.snapcraft.io

Currently I have two issues.

  1. Mouse disappears as soon as I move it.
  2. I don’t know how to enable webcam and audio.

Does anyone know how to enable audio and camera?
I want to use this with meet.google.com.

It looks as though @greyback has only published intel architectures on “beta”, I only see “edge” snaps for ARM.

I guess you’re running the default “stable” core snap, but chromium-mir-kiosk requires “edge”. Try updating core (which will restart the machine) and after the restart try again:

sudo snap refresh core --edge

I figured out how to enable audio and camera.

snap connect chromium-mir-kiosk:camera core:camera
snap install pulseaudio

But I still don’t see the mouse and there is now visible audio control (volume).

That sounds like https://github.com/MirServer/mir/issues/555

That post issue only mentions the transition from a regular pointer to a text pointer. Nothing about it disappearing. So not sure if it’s the same.
Anyone else experiencing that the mouse visible when chromium-mir-kiosk starts and disappears a as soon there is mouse movement?

True, but I suspect pointer issues on Xwayland to be related.

IIRC @ogra raised something similar on #mir-server a few days ago. I don’t think it is resolved yet.

Contact us if you need help with enabling full GPU acceleration for web kiosks on specific ARM hardware.

It would be great if you could provide any insight on that topic. I’m interested in enabling full GPU specifically on the Raspberry Pi.

As for my attempts with chromium-mir-kiosk, I’m getting the following:

Sep 11 12:47:01 localhost.localdomain audit[2815]: AVC apparmor="DENIED" operation="mkdir" profile="snap.chromium-mir-kiosk.chromium" name="/run/user/0/" pid=2815 comm="mkd
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: mkdir: cannot create directory ‘/run/user/0’: Permission denied
Sep 11 12:47:01 localhost.localdomain kernel: audit: type=1400 audit(1536670021.398:30): apparmor="DENIED" operation="mkdir" profile="snap.chromium-mir-kiosk.chromium" name
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Doc
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Des
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Dow
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Mus
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Pic
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Vid
Sep 11 12:47:01 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ln: failed to create symbolic link '/root/snap/chromium-mir-kiosk/14/snap/chromium-mir-kiosk/14/Tem
Sep 11 12:47:02 localhost.localdomain audit[2873]: AVC apparmor="DENIED" operation="mkdir" profile="snap.chromium-mir-kiosk.chromium" name="/run/user/0/" pid=2873 comm="mkd
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: mkdir: cannot create directory ‘/run/user/0’: Permission denied
Sep 11 12:47:02 localhost.localdomain kernel: audit: type=1400 audit(1536670022.042:31): apparmor="DENIED" operation="mkdir" profile="snap.chromium-mir-kiosk.chromium" name
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: Error: Unable to open a valid Wayland socket!
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ##################################################################################
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: You need to connect this snap to one which implements the 'wayland' plug.
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: You can do this with these commands:
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]:   snap install mir-kiosk
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]:   snap connect chromium-mir-kiosk:wayland mir-kiosk:wayland
Sep 11 12:47:02 localhost.localdomain chromium-mir-kiosk.chromium[2704]: ##################################################################################
Sep 11 12:47:02 localhost.localdomain systemd[1]: snap.chromium-mir-kiosk.chromium.service: Main process exited, code=exited, status=1/FAILURE

snap interfaces |grep chromium

chromium-mir-kiosk:x11        -
:browser-support              chromium-mir-kiosk:browser-sandbox
:network                      chromium-mir-kiosk
:opengl                       chromium-mir-kiosk,mir-kiosk
mir-kiosk:wayland             chromium-mir-kiosk
-                             chromium-mir-kiosk:camera
-                             chromium-mir-kiosk:cups-control
-                             chromium-mir-kiosk:desktop
-                             chromium-mir-kiosk:gsettings
-                             chromium-mir-kiosk:hardware-observe
-                             chromium-mir-kiosk:home
-                             chromium-mir-kiosk:mount-observe
-                             chromium-mir-kiosk:network-manager
-                             chromium-mir-kiosk:password-manager-service
-                             chromium-mir-kiosk:pulseaudio
-                             chromium-mir-kiosk:removable-media
-                             chromium-mir-kiosk:screen-inhibit-control
-                             chromium-mir-kiosk:x11-plug
1 Like

Well, this doesn’t seem to work anymore.

I installed Ubuntu Core --edge, mir-kiosk --stable, and chromium-mir-kiosk --beta. I am getting the apparmor=“DENIED” bug .

audit: type=1400 audit(1536768497.736:86): apparmor="DENIED" operation="mkdir" profile="snap.chromium-mir-kiosk.chromium" name="/run/user/0/" pid=3670 comm="mkdir" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

C

EDIT: Removed and re-installed chromium-mir-kiosk with --devmode and it sort of works. Still not getting chromium on display, but no longer getting apparmor profile issues.

Hi there,

Is it possible to customise the Chromium somehow? Such as start page, switch off the reload that occurs now etc. Also, is there a way to hide the mouse pointer. On a touch screen there is obviously no need for a pointer.

Please advise!

Cheers and best regards,
Peter

I’m not familiar enough with the chromium-mir-kiosk snap to answer your questions about that. But…

…have you tried snap get chromium-mir-kiosk to see what these options are?

Using mir-kiosk from --edge it is possible to force the cursor off in the configuration file:

sudo echo cursor=null >> /var/snap/mir-kiosk/common/miral-kiosk.config
sudo snap restart mir-kiosk

Hi @choward,

That denial should not be a problem. Did you snap connect chromium-mir-kiosk:wayland-socket-dir mir-kiosk:wayland-socket-dir and restart the two services? Or reboot? I just tried your steps on stable Core (edge isn’t necessary any more - but I checked, too) and it worked fine without --devmode.

We’re in a transition phase to remove the wayland-socket-dir plug/slot in favour of using the official wayland interface. You can try it with mir-kiosk and chromium-mir-kiosk from --channel edge/wayland-interface, that should all connect automatically and Just Work™ after installation. We will publish it to stable and beta, respectively, next week at the latest.

Just wanted to let you know that this works on stable core now.

I found the settings fr the chromium-mir-kiosk. Thanks for that tip! I managed to remove the refresh time and alter the url. However the option for hiding the curser in the chromium-mir-kiosk didn’t have any effect.

So I tried to hide using your other tip but I can’t manage to get it working. The miral-kiosk.config doesn’t exist and even though I create a file with the line cursor=null the pointer remains visible.
I have refreshed to the --edge mir-kiosk.
Am I missing something?

Sorry if my questions are kinda noob but thats because I am a noob :wink:

Thanks!

Just that I mistyped the filename from memory:

sudo echo cursor=null >> /var/snap/mir-kiosk/common/miral-kiosk.config
sudo snap restart mir-kiosk

Alright! Thanks! It works now! :smiley: