Configuring mir-kiosk: a masterclass

Set the keymap option in the .configure file.

1 Like

Hi,

Is there any way to set permission? I am getting below error while loading a specific page.
This page otherwise loads properly in other browser.

chromium-mir-kiosk.chromium-mir-kiosk[16272]: [16588:16588:0926/153636.970883:INFO:CONSOLE(0)] “Unchecked runtime.lastError: Cannot access contents of the page. Extension manifest must request permission to access the respective host.”, source: chrome-extension://mebpkjlidhbhcijdfilbkcapobaejicc/windows/browser.html (0)

Thanks in advance.
Regards,
Smita

Hi @smitaso, that doesn’t look like an issue with mir-kiosk configuration. Discussion of the (obsolete) chromium-mir-kiosk snap belongs elsewhere:

Hello guys - following this tutorial (Raspberry Pi 4B + Ubuntu Core 18)

1. Fresh install Ubuntu Core 18 (Screen with the ending personalize your account at …) and blinking cursor
2. Following steps in tutorial and after $ snap start mir-kiosk-scummvm I’ve got in terminal (SSH access):
error: snap “snapd” has no “pulseaudio” interface slots
error: snap “snapd” has no “wayland” interface slots

Any idea how to continue? Thank you for your patience and help.

All the best, Tomas

Sorry @hjertefolger those “errors” shouldn’t be a problem. Just check things are connected. You should see something like:

$ snap connections mir-kiosk-scummvm
Interface   Plug                          Slot                Notes
alsa        mir-kiosk-scummvm:alsa        -                   -
opengl      mir-kiosk-scummvm:opengl      :opengl             -
pulseaudio  mir-kiosk-scummvm:pulseaudio  pulseaudio:service  -
wayland     mir-kiosk-scummvm:wayland     mir-kiosk:wayland   -

Now try:

$ snap start mir-kiosk-scummvm

I’ll update the instructions to make this clearer.

1 Like

Dear @alan_g thank you very much for your reply.

This is my output from terminal (I’m SSHed to Pi from Macbook):

user@localhost:~$ snap connections mir-kiosk-scummvm
Interface Plug Slot Notes
alsa mir-kiosk-scummvm:alsa :alsa manual
opengl mir-kiosk-scummvm:opengl :opengl -
pulseaudio mir-kiosk-scummvm:pulseaudio - -
wayland mir-kiosk-scummvm:wayland mir-kiosk:wayland -

user@localhost:~$ snap start mir-kiosk-scummvm
Started.

But the Raspberry screen didn’t change - still a “welcome” screen
"Ubuntu Core 18 on xx.xx.xx.xx (tty6), The host keys, etc …

Thank you very much for any help. All the best, Tomas

I’m sorry, I don’t know how to format terminal output properly :confused:

That suggests that mir-kiosk is not running. Try:

snap logs mir-kiosk

It’s markdown: use three back-ticks: ```

To get a pulseaudio interface on core you need to install the pulseaudio snap package first, then you can connect to the interface it provides…

You said pi4, I assume you use my experimental core image then? If so, mir does not work on the kernel I use in this image yet. The vc5 driver in that kernel is not fully ready for kms … so while you can run something like the omxplayer-pi snap on that image (which directly talks to the proprietary driver), kms based graphics software like mir or wayland will currently not work… you can use a pi3 though, there mir is fully supported and working.

1 Like

@ogra @alan_g Thank you guys. Yes, I was trying to use your experimental core image. I’m sorry I didn’t make this clear.

These are the logs from terminal, but I assume now you know them:

2019-10-02T08:51:52Z mir-kiosk.daemon[12679]: Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::system_error> >
2019-10-02T08:51:52Z mir-kiosk.daemon[12679]: std::exception::what: Couldn't get DRM resources: Operation not supported
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Main process exited, code=exited, status=1/FAILURE
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Failed with result 'exit-code'.
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Service hold-off time over, scheduling restart.
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Scheduled restart job, restart counter is at 5.
2019-10-02T08:51:52Z systemd[1]: Stopped Service for snap application mir-kiosk.daemon.
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Start request repeated too quickly.
2019-10-02T08:51:52Z systemd[1]: snap.mir-kiosk.daemon.service: Failed with result 'exit-code'.
2019-10-02T08:51:52Z systemd[1]: Failed to start Service for snap application mir-kiosk.daemon. ```

Thank you very much. In any case, do you guys know something similar like mir-kiosk that I can use to boot into Electron app in Pi that I could try for Pi4? I've tried almost everything out there without any luck - just like it is possible to boot into chromium in kiosk mode, I just wanted to accomplish to boot into my linux app fullscreen.

Thank you for your time, patience and great effort. All the best, Tomas

Hi,

I was following the great electron-kiosk tutorial. I’d like to power off the screen after some idle time but I couldn’t find any resource on how to achieve that with mir. Any idea on how to achieve that ?

That’s an obvious thing to want to do. I’m surprised it hasn’t come up before, but it isn’t supported currently.

Blanking the screen or starting some “screensaver” would be a simple improvement to miral-kiosk, the program used by mir-kiosk. (Actually powering off the screen hardware a bit more involved.) Would you make a feature request here:

https://github.com/MirServer/mir-kiosk/issues

1 Like

Thanks, it’s done, tell me if I can help with anything, I’m not a professional C developper (I’m more into Python & JS) but I’d be happy to help :slight_smile:

You’re welcome to take a look, PRs are always welcome.

This is probably a good starting point: https://mir-server.io/doc/getting_involved_in_mir.html

The miral-kiosk code you would be changing is in examples/miral-kiosk.

1 Like

Hi, I use kiosk for display status pages when they are requested via network. But when url is changed using:

snap set wpe-webkit-mir-kiosk url=https://www.example.com

it is very slow, becouse kiosk is restarted when settings changed. It is posible to change url using dbus-cogctl (I dont’t know how it works) or using other method for immediate effect?

you should ask the packager (this is something that needs to be implemented on the packaging level) via the contact link on Install WPE WebKit for Mir Kiosk on Linux | Snap Store or via a forum post in forum.snapcraft.io (i know he is active there and will see it)

3 Likes

Just an update, since i was looking for a more recent version of this documentation today, the latest Mir configuration documentation for ubuntu-frame is now at:

https://github.com/MirServer/ubuntu-frame/blob/master/REFERENCE.md

2 Likes

Great guide to mir-kiosk!
I’m having trouble with changing the keymap option in the configuration file. I’m trying to change the keyboard layout to Swedish and have tried several different ways. Maybe I’m just misunderstanding the instructions. I have put keymap=se in the configuration file, and tried different variations like keymap=swe, keymap=“swe” and so on, but nothing changes the layout. Any ideas? Thanks!

Hi @coffeethought, I’ve tried keymap=se with mir-kiosk and that works for me :tm: . (The end of the top “qwerty” row has the expected accented characters, for example.)

Obviously, I’m doing something a little differently than you but that is probably down to the awkwardness around configuring mir-kiosk.

Rather than trying to figure out what we are doing differently I would strongly recommend using Ubuntu Frame in place of mir-kiosk as does all the same things and more and it is much easier to configure.

The corresponding configuration notes for Frame are here:

https://github.com/MirServer/ubuntu-frame/blob/master/REFERENCE.md

All the same options (and specifically, keymap=se) work, but are easier to get right.

HTH

1 Like

3 posts were split to a new topic: none is wrong for Ubuntu Frame cursor configuration