How to open Firefox on a remote machine but get the display on the local machine using SSH?

Edit /etc/ssh/sshd_config on the remote machine. It should contain this:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

Restart sshd.

Login to remote via ssh as usual but don't forget to use -X option (enable X11 forwarding). Using -C (compression) is also recommended because X through ssh will be much slower than through telnet anyway. Once you logged in, without setting DISPLAY yourself, type

$ echo $DISPLAY

it should show this strange value:

localhost:10.0

It's strange but perfect. Now you can just type

firefox

and wait for its window to open. Wait really means wait because unless the remote machine is very close to you, it will take a while. Be patient.

Tags:

Firefox

Ssh