X11Forwarding - toge510/homelab GitHub Wiki
X11Forwarding
X11 forwarding is an SSH protocol that enables users to run graphical applications on a remote server and interact with them using their local display and I/O devices.
Trouble shooting
Could not connect to the X server
On a remote server
$ xeyes
Could not connect to the X server: Error: connect ECONNREFUSED /private/tmp/com.apple.launchd.eGxAkGGzz6/org.xquartz:0
Change $DISPLAY
On a local server
echo $DISPLAY
/private/tmp/com.apple.launchd.eGxAkGGzz6/org.xquartz:0
export DISPLAY=:0
X11 connection rejected because of wrong authentication
On a remote server
$ firefox
X11 connection rejected because of wrong authentication.
Error: cannot open display: localhost:11.0
Set XAUTHORITY
export XAUTHORITY=$HOME/.Xauthority