Migrate X11 authentication cookies into snap environment

Oh, I bet since this is xwayland that XAUTHORITY isn’t being set for you. The snap providing Xwayland should probably put it in XDG_RUNTIME_DIR or $HOME instead.

but the snap providing XWayland runs inside a VM and mir-kiosk (again, inside the VM) would be the one providing the whole display environment here, i dont get why in any of this the XAUTHORITY would have any impact beyond on running the VM on top of the desktop OS

Nope, can’t get that to work at all. Want me to wave my laptop under your nose tomorrow?

At times I mixed up my responses regarding Xwayland thinking that was the issue (it isn’t-- the tutorial works fine with a core 16 vm). For clarity, the issue is that the ubuntu-core-vm snap doesn’t work on KDE neon (apparently) and @popey must copy his xauth file to /tmp/snap.0_ubuntu-core-vm_VMxtMv/tmp.

@popey, if your xauth file on the host is /tmp/xauth-1000-_0. Can you run:

$ sudo -H XAUTHORITY=/tmp/xauth-1000-_0 ubuntu-core-vm

I suspect that still may not work since the xauth file is for your user but you are running under root, and /run/user/0 probably doesn’t exist (https://github.com/snapcore/snapd/blob/master/cmd/snap/cmd_run.go#L420). It might work if you create it with sudo mkdir -m 0700 /run/user/0.