Introducing wpe-webkit-mir-kiosk snap

Great to hear of such use-cases @James-Carroll :slight_smile:

The arm64 built is so outdated simply because I didn’t have a spare build machine. I built this snap as part of a complete appliance image which also supports older Pi models, so armhf is my main target. Building via launchpad isn’t (wasn’t?) an option because their builders are cut off the internet after 2 hours, so all parts built after wpe-webkit cannot have any network-related work.

In short: armhf is preferred, arm64 may be supported once I have a spare Pi 4 and some time to set up a builder :slight_smile:

Unfortunately the Launchpad two hour network cutoff still exists, that’s unfortunately bitten me with a few ARM related snap builds recently myself.

Thanks for the information though, the armhf build is completely fine for us, I just wasn’t sure what to recommend to him specifically considering the entire Ubuntu Core ecosystem in full. In the end, the other fancy bits that were relevant to the little experiment they’re doing (Grafana/InfluxDB monitoring some statistics over GPIO in a controlled environment) are too CPU constrained on a Pi to really work, but with the magic of sandboxed and automatically updating snaps, it’s still probably the most advanced display on the university network ;).

Thanks again.

1 Like

That fixes the cert problem. Thanks :slight_smile:

The latest revisions on {edge, beta, candidate} for armhf (r64) and amd64 (r63) leverage the new graphics-core20 interface (hat tip to @taiten and @alan_g). Please provide feedback if you encounter any regressions, otherwise I’ll release those revisions to stable on Monday.

1 Like

It’s possible to add a virtual keyboard to wpe-webkit-mir-kiosk snap? And when the pc disconnect from the network and connected again I have to refresh the browser manually , is there a solution for this problem ?

Thanks ,

To answer the first question: It is possible to add an onscreen keyboard to Ubuntu Frame and to use that with wpe-webkit-mir-kiosk…

Merry Christmas!

Thanks, Merry Christmas !

Hi @amirsack! To refresh the browser on certain events, you may use the snap’s dbus-cogctl slot. In my application, I also use a DBus signal listener to react to network-manager events. For example, you can set up a DBus listener for the NetworkManager StateChanged signal, and then trigger the reload action on the com.igalia.Cog service (object path /com/igalia/Cog, interface org.gtk.Actions).

Please note that this DBus service is exposed on the system bus if you start WPE in daemon mode (i.e. on Ubuntu Core devices). If you run wpe-webkit-mir-kiosk.cog in a regular desktop session, the service will not run. This behavior of the cog browser is configured at build time; afaik there’s no switch to change it at runtime.

Hi @tobias, I’m using your tool for some schoolscreens but i have the problem, that the browser sometimes didn’t reload or reload just the half site. I unstand that restarting ubuntu-frame or wpe-webkit-mir-kiosk doesn’t help, i have to resfreh cog. Can you tell me how to use the dbus-cogctl slot.

Hi @w1573, do you plan to trigger DBus commands manually via command line or programmatically from a snap? If you want to manually reload the browser in case of a load error, a simple snap restart wpe-webkit-mir-kiosk.daemon should work – this completely restarts the browser. If that does not resolve the load issue, can you please provide further details like snap logs -nall wpe-webkit-mir-kiosk.daemon?

The DBus slot basically allows other snaps to talk to WPE’s DBus service on the system bus. How you call it depends a lot on your use case, please provide some more details so I can help you :slightly_smiling_face:

Hello guys, what provisions are there to enable self signed certificates, register a custom CA authority, or mark a localnet URL as safe? Keeping the encryption HTTPS provides is very valuable for localnet web apps. I control and trust the kioks but not the wire. Adding a VPN/ssh-tunnel feels unnatural. I am currently getting the clasic: TLS certificate has unknown CA, identity mismatch.. Great work. Thank you.

Hi @samuelventura, sorry for the late reply. There is a WebKit option to ignore TLS/certificate errors, I’ll look it up. At any rate, this would need to be added to the launcher as a snap setting to make it configurable.

wpe-webkit-mir-kiosk 2.36.7 is now available on the edge channel for amd64, armhf and arm64 architectures. Please provide feedback if something is not working as expected.

For people who use WPE with ubuntu-frame (or mir-kiosk, mir-test-tools, egmde), please test with the candidate version of ubuntu-frame to check if the issue mentioned in Call for testing: ubuntu-frame, mir-kiosk, mir-test-tools, egmde is resolved for you as well.

EDIT: I released amd64 and armhf revisions to stable (were in beta and candidate already). arm64 is still in candidate since I don’t have a machine at hand to confirm that rev71 works as intended.

wpe-webkit-mir-kiosk 2.38.0 is now available on the edge channel for armhf and arm64 architectures, amd64 to follow in a few hours. Please provide feedback if something is not working as expected. Will promote to stable on Monday 26th if there are no testing issues.

Upstream release announcements:

Hi @tobias, Hello everyone. I’m developing an industrial application. Sometimes the kiosk can’t get to the page (Could not connect: no route to host), just because the server exposing the UI is not yet ready. Is there a way to restart wpe-webkit-mir-kiosk till the page is ready? Thanks in advance

Hi Igor, I assume you mean automatic reload if the page cannot be opened? I’m afraid that is not possible right now, see this issue in the cog repository. Your next-best option would be to build a small service snap that queries your server’s status, and if the host cannot be resolved / server issues a 404 or similar, have your snap reload WPE via D-Bus.

Basically, your monitoring snap would declare a dbus-cogctl plug:

# in snapcraft.yaml
plugs:
  dbus-cogctl:
    interface: dbus
    bus: system
    name: com.igalia.Cog

Then use your D-Bus integration of choice to call:

  • bus: system
  • service name: com.igalia.Cog
  • object path: /com/igalia/Cog
  • interface: org.gtk.Actions
  • method: Activate('reload', [], {})

Hi @tobias. Thank you very much for your response.

I landed onto an alternative solution: a local nginx with a loader.html which waits for the other server to be ready. The loader.html contains a similar to the following:

setTimeout(()=> { var xhr = newXMLHttpRequest(); var targetUrl = ‘…’;

xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { window.location.href = targetUrl; } }

xhr.open(‘head’,targetUrl); xhr.send(null); }, 3000);

1 Like

After positive test feedback, version 2.38.2 is available on stable. Revisions:

  • 86: amd64
  • 87: armhf
  • 88: arm64

Aside from shipping the latest stable WPE WebKit + components, the snap itself enables the remote HTTP inspector (remote inspection from other browsers than WebKitGTK :partying_face🙂 and offers configurable ports for both the remote inspector as well as the remote HTTP inspector through snap set.

Thanks so much for making this great snap. I nearly have everything working as I need it - the last piece is getting webcam access.

I feel like I’m missing something obvious, but I do not see a connection interface, nor can I find any references. It appears to give the same error as happens when the browser is blocking the camera/mic permissions notification, but the UI obviously isn’t showing it.

Apologies if this is in the wrong spot in the forum, please move as necessary.

Any help that could point me in the right direction would be greatly appreciated.

Thanks, glad it’s helpful for you!

The WPE snap does not declare the camera interface right now. This is the first time someone requested it :sweat_smile:

If you’re comfortable with snapcraft, feel free to open a merge request on the repository. May be enough to just declare the interface on the top-level plugs section. Otherwise, I’ll run a test as soon as I have some spare time.