What is the correct way to build a GUI application that runs on Ubuntu Core?


I built an electron app using electron-builder for my raspberry pi, but the problem is that it won’t run on Ubuntu Core. It throws this error:

Gtk-WARNING **: cannot open display

I’m guessing it’s because ubuntu core doesn’t ship with any graphical libraries installed.

Do I need to install some sort of a display server like this: https://snapcraft.io/mir-kiosk
…and then connect my electron app to that?

Or is this unnecessary and instead I need to follow these instructions: https://hackmd.io/0I09MG1FRKqO0ehIdLHpoQ#

The mir server electron app example seems a bit outdated – can’t figure out if that’s still the proper way to do things…

to get graphical apps running on core you need to use mir-kiosk

@Zane470 Hi, were you finally able to build your app for ubuntu core with electron-builder? I know that is necessary to use mir-kiosk for it, but only example I found is with snapcraft, not electron-builder

I noticed that it is possible to pass some additional parameters for snap build https://www.electron.build/configuration/snap , but it looks like it is not possible to send all mentioned in that electron-kiosk tutorial.