Run app with enabled X11 forwarding via ssh

Hi everyone,

after connecting to a remote host via “ssh -X …” or “ssh -Y …” app from .deb runs as it supposed to be and displays itself on local monitor.

If I try to run the same app from .snap there’s errors like:

X11 connection rejected because of wrong authentication.
(pingpath:4450): Gtk-WARNING **: 22:57:05.762: Failed to open display

Is there way to run a graphical app from snap on remote host?

IIRC you need XAUTHORITY set to location of .Xauthority.

1 Like

Thanks, it works
XAUTHORITY=~/.Xauthority /snap/bin/someapp

(not clear why it doesn’t work automatically with snaps, but anyway it works, thanks)

The immediate reason why is that snapd doesn’t copy the file into the snap environment if the environment variable is not set. But that only leads to the next question: “why not?”