Jun 25 08:10:30 ubuntu kiosk.daemon[16670]: i3: Cannot open display
Jun 25 08:10:30 ubuntu kiosk.daemon[16656]: (EE) Failed to activate virtual core keyboard: 2(EE)
Jun 25 08:10:30 ubuntu kiosk.daemon[16656]: Fatal server error:
Jun 25 08:10:30 ubuntu kiosk.daemon[16656]: (EE)
Jun 25 08:10:30 ubuntu kiosk.daemon[16656]: Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
Jun 25 08:10:30 ubuntu kiosk.daemon[16656]: XKB: Failed to compile keymap
I didn’t mean “where did you copy your script from?”, I meant “find where snapcraft places your script in the snap image”.
I don’t think that https://github.com/MirServer/xwayland-kiosk-helper has been used with core20 before, so you’re in new territory. You likely need to tweak a few thing due to the snapcraft packaging changes. One of those things is adapting to files being packaged in different places.
The reason this has likely not been used with core20 is that the recommended approach changed years ago:
My main question, which i think it will guide me in the right direction, is:
Why when using “xwayland-kiosk-launch” in commmand, the “/snap/kiosk/current/bin/xwayland-kiosk-launch” file is generated? Because when i put the command in bash script the file is missing.
Which script copies/generates “xwayland-kiosk-launch” file in core18?
typically it comes from a part in your snapcraft.yaml like:
and you would call it as $SNAP/bin/xwayland-kiosk-launch in the command: line under core20, while on core18 you do not need to explicitly state the path … no idea why the shell script does not work though, have you tried adding set -x to get some output ?
did you try @alan_g’s command above to make sure xwayland-kiosk-launch is actually in that path ?
the set -x would have been in your run.sh shell script right below the #! /bin/sh (or bash) line … this makes the shell print out all lines and their results while it executes them. it makes debugging shell scripts easy …
$ sudo snap run kiosk.daemon
/root/snap/kiosk/common/.cache/gio-modules/libgiognomeproxy.so: cannot open shared object file: No such file or directory
Failed to load module: /root/snap/kiosk/common/.cache/gio-modules/libgiognomeproxy.so
/root/snap/kiosk/common/.cache/gio-modules/libgiognutls.so: cannot open shared object file: No such file or directory
Failed to load module: /root/snap/kiosk/common/.cache/gio-modules/libgiognutls.so
/root/snap/kiosk/common/.cache/gio-modules/libdconfsettings.so: cannot open shared object file: No such file or directory
Failed to load module: /root/snap/kiosk/common/.cache/gio-modules/libdconfsettings.so
/root/snap/kiosk/common/.cache/gio-modules/libgiolibproxy.so: cannot open shared object file: No such file or directory
Failed to load module: /root/snap/kiosk/common/.cache/gio-modules/libgiolibproxy.so
Failed to rename /root/snap/kiosk/x6/.local/share/mime/audio/x-aiff.xml.new as /root/snap/kiosk/x6/.local/share/mime/audio/x-aiff.xml: No such file or directory
ERROR: update-mime-database /root/snap/kiosk/x6/.local/share/mime exited abnormally with status 1
##################################################################################
If you are experiencing problems with your GUI app (e.g. bad fonts), please run:
snap connect kiosk:x11-plug kiosk:x11
##################################################################################
ERROR: ld.so: object '/snap/kiosk/x6/lib/libxwayland-preload.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
_XSERVTransSocketCreateListener: failed to bind listener
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for local
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
(EE)
Fatal server error:
(EE) Failed to activate virtual core keyboard: 2(EE)
i3: Cannot open display
/snap/kiosk/x6/usr/local/bin/xwayland-kiosk-launch: line 151: 110154 Segmentation fault (core dumped) "$@"
/snap/kiosk/x6/usr/local/bin/xwayland-kiosk-launch: line 1: kill: (-109904) - No such process
Hmm, that seems overly restrictive now. In principle, any version of Linux with support for snapd and with mesa graphics support in the kernel ought to be usable
I have some other updates to make to the tutorials queued up, and will add that to the list.
Sorry, I know very little about electronjs. Did I read recently that it has native support for Wayland? In which case you don’t need the complexity of the workarounds for X11.
sudo snap run kiosk.daemon
+ desktop-launch /snap/kiosk/x8/main/kiosk --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland
rm: cannot remove '/root/snap/kiosk/x8/.local/share/mime/application': Directory not empty
Failed to rename /root/snap/kiosk/x8/.local/share/mime/application/vnd.framemaker.xml.new as /root/snap/kiosk/x8/.local/share/mime/application/vnd.framemaker.xml: No such file or directory
ERROR: update-mime-database /root/snap/kiosk/x8/.local/share/mime exited abnormally with status 1
(kiosk:90203): Gtk-WARNING **: 14:34:41.193: Failed to parse /etc/gtk-3.0/settings.ini: Permission denied
(kiosk:90203): Gtk-WARNING **: 14:34:41.432: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
/snap/kiosk/x8/bin/run.sh: line 3: 90203 Aborted (core dumped) desktop-launch "$SNAP/main/kiosk" "--no-sandbox" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland"