Skip to content

Instantly share code, notes, and snippets.

@selfagency
Last active August 15, 2021 20:07
Show Gist options
  • Save selfagency/06b601ad3d9128fef7810aa0e008daa4 to your computer and use it in GitHub Desktop.
Save selfagency/06b601ad3d9128fef7810aa0e008daa4 to your computer and use it in GitHub Desktop.
[x11 over ssh]
#!/usr/bin/env bash
systemctl restart sshd
$AUTH=(xauth list | grep unix(echo $DISPLAY | cut -c10-12))
export DISPLAY=localhost:10.0
sudo xauth add $AUTH
sudo export DISPLAY=localhost:10.0
# uncomment
X11Forwarding
Host selfagency.dev
AddressFamily inet
ForwardAgent yes
ForwardX11 yes
XAuthLocation /opt/X11/bin/xauth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment