Problem with running snaps in ubuntu frame

Hello everyone!

I’m new to snaps and UbuntuCore. I was following this tutorial to learn how to run Qt4 app on UbuntuCore18.

I installed everything. Opened ubuntu frame. Created mir_kiosk_x11-example snap. Installed it. But I stuck on the 6th step where I need to run it in ubuntu frame.

After that 2 commands:

snap connect mir-kiosk-x11-example:wayland ubuntu-frame:wayland

I have this console log:

++ find /snap/mir-kiosk-x11-example/x1/hacks -name 'setup-*'
+ for hack in $(find "${SNAP}/hacks" -name setup-\*)
+ . /snap/mir-kiosk-x11-example/x1/hacks/setup-gl
++ set -x
++ export __EGL_VENDOR_LIBRARY_DIRS=/snap/mir-kiosk-x11-example/x1/etc/glvnd/egl_vendor.d:/snap/mir-kiosk-x11-example/x1/usr/share/glvnd/egl_vendor.d
++ __EGL_VENDOR_LIBRARY_DIRS=/snap/mir-kiosk-x11-example/x1/etc/glvnd/egl_vendor.d:/snap/mir-kiosk-x11-example/x1/usr/share/glvnd/egl_vendor.d
++ export LIBGL_DRIVERS_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu/dri
++ LIBGL_DRIVERS_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu/dri
++ export LD_LIBRARY_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu:/snap/mir-kiosk-x11-example/x1/lib/x86_64-linux-gnu:/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/mir-kiosk-x11-example/x1/lib:/snap/mir-kiosk-x11-example/x1/usr/lib:/snap/mir-kiosk-x11-example/x1/lib/x86_64-linux-gnu:/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu
++ LD_LIBRARY_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu:/snap/mir-kiosk-x11-example/x1/lib/x86_64-linux-gnu:/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/mir-kiosk-x11-example/x1/lib:/snap/mir-kiosk-x11-example/x1/usr/lib:/snap/mir-kiosk-x11-example/x1/lib/x86_64-linux-gnu:/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu
+ for hack in $(find "${SNAP}/hacks" -name setup-\*)
+ . /snap/mir-kiosk-x11-example/x1/hacks/setup-mir
++ set -x
++ export MIR_SERVER_PLATFORM_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu/mir/server-platform
++ MIR_SERVER_PLATFORM_PATH=/snap/mir-kiosk-x11-example/x1/usr/lib/x86_64-linux-gnu/mir/server-platform
++ export MIR_SERVER_XWAYLAND_PATH=/snap/mir-kiosk-x11-example/x1/usr/bin/Xwayland
++ MIR_SERVER_XWAYLAND_PATH=/snap/mir-kiosk-x11-example/x1/usr/bin/Xwayland
+ for hack in $(find "${SNAP}/hacks" -name setup-\*)
+ . /snap/mir-kiosk-x11-example/x1/hacks/setup-wayland-host
++ set -x
++ snapctl is-connected wayland
+++ dirname /run/user/1001/snap.mir-kiosk-x11-example
++ real_xdg_runtime_dir=/run/user/1001
++ real_wayland=/run/user/1001/wayland-0
++ wait_for /run/user/1001
++ inotify_pid=29357
++ '[' -O /run/user/1001 ']'
++ kill 29357
++ wait_for /run/user/1001/wayland-0
++ inotify_pid=29358
++ '[' -O /run/user/1001/wayland-0 ']'
++ wait 29358
+++ dirname /run/user/1001/wayland-0
++ inotifywait --event create /run/user/1001
Setting up watches.
Watches established.

And nothing happens. Mir on X window stays grey as it was. Also, I tried to run wpe-webkit-mir-kiosk and had the same result.

Does anybody have any thoughts on how to solve this problem?

I forgot to say that on my UbuntuCore18 virtual machine everything works perfectly. I can see mir-kiosk-x11-example animation.

But I need an ubuntu frame on my local machine to test and debug my future Qt4 projects.

I appreciate any help. Thank you.

You will notice that the tutorial says:

You should follow the tutorial using this terminal and this “Mir on X” window. If you close them, or open another terminal to work in remember to export WAYLAND_DISPLAY=wayland-99

From the logs above WAYLAND_DISPLAY is either not set, or set to wayland-0.


BTW Is there a reason you want to use Qt4 and X11? It is far simpler to use Qt5 and Wayland.

Oh, I should check if I export wayland in every terminal that I use. Thank you for the tip, I will double-check this.

At my job we have a big Qt4 project that we want to run using UbuntuCore, maybe in the future we will migrate to Qt5.

Thank you very much for your help. Now I will be more careful with reading tutorials :books:

1 Like