Introducing wpe-webkit-mir-kiosk snap

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.

Ha! Breaking new ground, I love it :slight_smile:

OK, I see that section - I’ll move this to a repo conversation & see if I can give that a try

Hey @igor.devescovi - I’m looking to do similar. Did you have any issues with this? Would you be able to elaborate slightly on it? So you point the URL of webkit-kiosk to your loader.html instead of the HMI? We’re using Ignition, which is a similar situation…

I have the same issue as Kanishkasw regarding WPE rendering fonts, and getting boxes instead. For example, my kiosk is set to display https://www.compart.com/en/unicode/U+23F1 but renders the stopwatch characters as boxes. This is because the Dejavu font that WPE is packaged with only supports certain Unicode characters. How do we fix this? Thank you!

To align with ubuntu-frame’s policy to maintain only versioned tracks going forward, WPE now also has 20/22/24 tracks. latest will stay on core20-based builds.

22 is the new default track, so installations without a specified channel will use 22/stable by default. Existing installations that track latest will stay on latest.

You can use/switch to the new, versioned channels with snap {install,refresh} --channel={20,22,24}/stable wpe-webkit-mir-kiosk.

Hat tip to @Saviq who provided the merge request for core22!

2 Likes