Wpe-webkit-mir-kiosk - How to create an Ubuntu Core image?

I apologized in advanced if this post is out of place. But I really would like to get some help, I’m new in all this so I’m learning through the process.

I’m trying to introduce Ubuntu Core in the company I’m working for to use it as images for our devices. I’m preparing a presentation and for that I created 3 different snaps:

  1. A NodeJS rest API
  2. A Python API
  3. A Web Application

All the snaps works perfectly fine during snap installation, my idea is to create an Ubuntu Core image that contain the 3 snaps.

The Web Application Snap creates a Web server that expose a very simple UI, I tested locally using the wpe-webkit-mir-kiosk snap and it worked perfectly fine too.

Here are my questions:

  • Can I configure an Ubuntu Core image that automatically install the 3 snaps (I already tested this and works fine) and also install the wpe-webkit-mir-kiosk and automatically show the UI after booting? Exactly like a Kiosk like app?
  • I was thinking to just add the wpe-webkit-mir-kiosk snap in the model assertion but, how I tell the image it should be executed after boot? also where should I add the command snap set wpe-webkit-mir-kiosk url=https://mir-server.io during the image creation/or boot?

This is the model assertion so far for the image:

{
    "type": "model",
    "series": "16",
    "model": "ubuntu-core-22-amd64",
    "architecture": "amd64",
    "authority-id": "M4Sgn1hsc71ZGyruwuhpWh3157Nco9w7",
    "brand-id": "personal",
    "timestamp": "2022-04-04T10:40:41+00:00",
    "base": "core22",
    "grade": "signed",
    "snaps": [
        {
            "name": "pc",
            "type": "gadget",
            "default-channel": "22/stable",
            "id": "UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH"
        },
        {
            "name": "pc-kernel",
            "type": "kernel",
            "default-channel": "22/stable",
            "id": "pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza"
        },
        {
            "name": "core22",
            "type": "base",
            "default-channel": "latest/stable",
            "id": "amcUKQILKXHHTlmSa7NMdnXSx02dNeeT"
        },
        {
            "name": "snapd",
            "type": "snapd",
            "default-channel": "latest/stable",
            "id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
        },
        {
            "name": "jr-node-api",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "zaSnV7SFZIZDAt8fregMDIQ3GVWU2Ux4"
        },
        {
            "name": "jr-python-api",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "QbX5j8WylrYwMMYhy6tcJNOp8FTo5ibQ"
        },
        {
            "name": "jr-web-app",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "z2PO0ksiRxogHoDyffVD2ljAEckN4OwQ"
        },
        {
            "name": "ubuntu-frame",
            "type": "app",
            "default-channel": "22/stable",
            "id": "BPZbvWzvoMTrpec4goCXlckLe2IhfthK"
        },
        {
            "name": "wpe-webkit-mir-kiosk",
            "type": "app",
            "default-channel": "latest/stable",
            "id": "01sV9tv4UTUQTU3jYsAF1gJ5qv7ZqGls"
        }
        
    ]
}

Thanks in advance.

1 Like