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

@desquare
if you switch back to stable mir-kiosk, do these random reboots go away? I’m very intrigued how Mir/Chromium could possibly cause the whole device to reboot!

Note: chromium-mir-kiosk is lacking a little polish to be a full production-ready digital signage solution. It has minimal testing, security updates are not guaranteed, and I know the hide cursor thing didn’t quite work either. There’s no OSK solution for touch-screen devices either.

Please contact us if you’d like to work with us to improve it.
-G

@greyback

I’ll try that out and see if that changes things. I also have a Dragonboard 410 that I can deploy the snap on to see if the problems occur on that ARM platform as well.

I’ve 14 years of experience in the digital signage business and I think that now the web technology is somewhat mature enough to be used for 24/7 applications. That in combination with IoT focused operating sysmtems such as Ubuntu Core (and also Windows IoT Core that I have created some customised images for) is very exiting and secure to work with. However I’m an entrepreneur and designer with a good feeling for user experience and not a developer. I’m fairly good at tweaking systems on an OS level, as long as I have good documentation, but not when it comes to programming.

I would love to work with you to improve this snap if you are interested in what I can provide as an expert of the market and user needs from a business point a view.

Cheers!

@desquare I only meant the snap is not production quality, not web technologies themselves :slight_smile:

@greyback Gotcha! :wink:

Hey all, note the transition time is drawing to a close, mir-kiosk with the wayland interface is available in the candidate channel now (as well as edge).

The compatible “chromium-mir-kiosk” is in the edge channel and will move to beta when we release mir-kiosk to stable later today.

The tutorials are being updated with this PR.

1 Like

And the new tutorials are up: http://bit.ly/secure-kiosk.

chromium-mir-kiosk resets the home page every resettime=n from the boot or from the first inactivity. Is that an expected behavior?

I think a better way would be to reset the homepage just once after every inactivity period that followed activity period of user interacting with the kiosk.

One other suggestion would be to include the parameters to hide the vertical and horizontal chromium scrollbars, it really damages the whole touch based UX.

Setting multiple homepages gives out this error:

$ snap set chromium-mir-kiosk url=["http://www.canonical.com","https://www.ubuntu.com"]
error: cannot perform the following tasks:
- Run configure hook of "chromium-mir-kiosk" snap (run hook "configure": Error: URL "[http://www.canonical.com,https://www.ubuntu.com]" needs to start with http:// or https://)

Hi @KristijanZic thanks for the feedback!

We’ve missed the single quotes in the tutorial, the array needs to be passed to the browser pristine:

$ snap set chromium-mir-kiosk url='["http://www.canonical.com","https://www.ubuntu.com"]'

As for your suggestions, think you could propose changes to the bazaar repo? Note this snap is a proof of concept, not a production-grade solution.

2 Likes

Hi,

I wonder how to rotate the chromium-mir-kiosk so that it follows the settings for mir-kiosk as described in this thread: Display Configuration for mir-kiosk
When setting the mir-kiosk to portrait the chromium-mir-kiosk canvas is rotated as well, however it just keeps it landscape format in 90 degrees. So it won’t get a proper portrait rendering.
Any thoughts on this?

Cheers!

Hi @desquare,
I’m aware of the bug at least. I suspect the problem is the i3 WM, which isn’t aware of the rotation happening, so fails to resize chromium. XWayland seems to be doing the right thing anyway. I’ve not yet found time to investigate further, but it’s on my list.
-G

1 Like

The bug tracker doesn’t seem to be set up or am I missing something?

If you mean for chromium-mir-kiosk, yes, that’s on purpose. Again, it’s not a project that we’re willing to support, not a production grade solution, rather just a demo of what could be achieved given some work.

Hi, first of all: Thanks to you all for the great package! I am currently using it on a Intel NUC with a touch display.

As pointed out by Tobias and @alan_g the portrait mode requires the chromium to run in a non-kiosk mode and a little hack in the i3 configuration.

The only downside for me with this configuration is that Chromium creates a context menu on right click. I have disabled the right mouse button by adding

bindsym --whole-window button3 nop

to the i3.config, this works. But the touch display has a nifty feature: A two finger “click” results in a context menu, too. I have searched many post an I know now that mir uses the “mir:evdev-input (version: 1.1.2)” input driver and that the device is known as “Multi-touch Device”. Does anybody know how to disable the two finger event or the context menu itself?

Kind regards Markus

1 Like

Hi @mit
only reliable way I know to do that is with an extension. Perhaps you can try something like this:
https://stackoverflow.com/questions/28222548/how-to-disable-context-menu-on-right-click-long-touch-in-a-kiosk-mode-of-chrome

In disabling kiosk mode, you lose the other security/limitations it provides. Perhaps you can hack the kiosk extension code itself? My branch is here:


-G

Hi @greyback,

many thanks for your time and your answer. It makes me realizing the whole stack chromium is running under. The extension will probably work, I’ll integrate it - thanks!

Hacking the Kiosk code itself you be another solution but I think I should better spend my time in fixing the real problem: Why does the portrait mode not work? As Alan states in the other thread in the snapcraft.io forum:

This problem lies somewhere between Xwayland, the Window Manager (i3) and the X client (chromium). At least one of them is doing the wrong thing.

It would be great if anyone has a good starting point for debugging, I’ll dive into it next week.

Kind regards Markus

I’ll just mention the alternative web kiosk: Install WPE WebKit for Mir Kiosk on Linux | Snap Store which is mentioned on the snapcraft forum.

(I realize you’ve likely seen it and ruled it out for your needs, but it deserves a mention on this thread.)

1 Like

Could i remotely take screenshots for my chromium-mir-kiosk ( using flameshot) or other solution ( imagick ) ?
in order to remotely monitor my device using ubuntu core and mir-kiosk and chromium-mir-kiosk ?

The security model we implement ensures that applications can only “see” their own windows and not other parts of the display. This prevents screenshotting by “normal” applications.

There are Wayland extension protocols to support screenshotting applications but they are not implemented by Mir and, for security reasons, would not be enabled by default.

Being able to access the display remotely has been discussed (for example https://github.com/MirServer/mir/issues/467) but is not currently supported.