I am trying to follow this tutorial:
When symlinking the Wayland socket into the in-snap $XDG_RUNTIME_DIR
:
michael@snapdev:~/glmark2-example$ snap run glmark2-example
Error: main: Could not initialize canvas
Segmentation fault (core dumped)
michael@snapdev:~/glmark2-example$ snap run --shell glmark2-example
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
michael@snapdev:/home/michael/glmark2-example$ echo $XDG_RUNTIME_DIR
/run/user/1000/snap.glmark2-example
michael@snapdev:/home/michael/glmark2-example$ mkdir -p $XDG_RUNTIME_DIR
michael@snapdev:/home/michael/glmark2-example$ ln -s $XDG_RUNTIME_DIR/../wayland-0 $XDG_RUNTIME_DIR/
michael@snapdev:/home/michael/glmark2-example$ ls /run/user/0
ls: cannot access '/run/user/0': No such file or directory
michael@snapdev:/home/michael/glmark2-example$ ls /run/user/0/wayland-0
ls: cannot access '/run/user/0/wayland-0': No such file or directory
michael@snapdev:/home/michael/glmark2-example$ echo $WAYLAND_DISPLAY
michael@snapdev:/home/michael/glmark2-example$
According to the tutorial I should have $WAYLAND_DISPLAY
set to wayland-0
, and the symlinking the socket should have worked (exist).