Notes / x11chromiumsnapsshubuntuxauthority
Chromium over ssh -X: Connection rejected because of wrong authentification
Forwarded X11 worked for xterm but the snap-packaged Chromium failed with "Connection rejected because of wrong authentification". The snap looks for .Xauthority inside its own home; symlinking it there fixes it.
Tested onUbuntu 20.04 (both ends); Chromium snap; OpenSSH X11 forwarding
Symptoms #
Between two Ubuntu 20.04 machines, ssh -X forwarding worked for xterm and friends, but
Chromium refused to open:
textConnection rejected because of wrong authentification
Cause #
Chromium on Ubuntu is a snap. Snaps get their own $HOME under ~/snap/<name>/current,
so Chromium looks for .Xauthority there and never finds the cookie that sshd wrote to
~/.Xauthority.
Fix #
Link the real file into the snap's home:
bashln -s ~/.Xauthority ~/snap/chromium/current/.Xauthority
Alternatively run it with XAUTHORITY=$HOME/.Xauthority chromium.