Skip to content

Instantly share code, notes, and snippets.

@jgwill
Created December 6, 2020 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgwill/2fc4cf93a3f693ed035abf7c9451872e to your computer and use it in GitHub Desktop.
Save jgwill/2fc4cf93a3f693ed035abf7c9451872e to your computer and use it in GitHub Desktop.
Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display

Remote X11 Forwarding - An auto setting of the SSH (remote) IP as a target for the display

Add to .bashrc

export myip=$(export myipis=$(last | grep "still logged" | awk '/still/ { print $3 }') ; echo $myipis | awk '// { print $1 }')
export DISPLAY=$myip:0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment