Various ways to forward X sessions to other computers.

when SSHing

Use ssh -X.

If you only want to do the X-forwarding, but don't want to keep the shell around, use ssh -fX.

To make this permanent (even on a per-host basis), put `ForwardX11 yes` in your ~/.ssh/config file.

when 'su'ing

when 'sudo'ing

Several different ways:

inside tmux/screen

see here

Double hop

Use xhost + before SSHing to the next host.

External links