I have the following setup: Machine A (a.corp, 192.168.100.130, local machine) and Machine B (b.corp, remote machine) and a monitor is connected to each of these machines. When I ssh from a.corp to b.corp as
Machine A, local machine, i.e., a.corp set up:
.ssh/config
Host *
ForwardX11 yes
TCPKeepAlive no
ServerAliveInterval 15
ServerAliveCountMax 10
IdentityFile ~/.ssh/id_dsa.work
/etc/ssh_config
(it is a OS-x, Darwin 12.2.0)
Host *
SendEnv LANG LC_*
ForwardX11 yes
MachineB, remote machine, i.e., b.corp setup: (ubuntu kernel: 3.2.0)
.ssh/config
Host *
ForwardX11 yes
IdentityFile ~/.ssh/id_dsa.work
/etc/ssh/ssh_config
Host *
SendEnv LANG LC_*
ForwardX11 yes
Case 1:
(DISPLAY on a.corp is not set)
$ echo $DISPLAY
$ ssh -X b.corp
(DISPLAY on b.corp is not set either)
$ echo $DISPLAY
$ xclock
Error: Can't open display:
Case 2: I tried setting the DISPLAY variable as
(DISPLAY on a.corp is not set)
$ echo $DISPLAY
$ ssh -X b.corp
$ export DISPLAY=`echo $SSH_CLIENT|cut -f1 -d\ `:0.0
$ echo $DISPLAY
192.168.100.130:0.0
$ xclock
xclock's display opens up but on the monitor connected to b.corp (remote machine) and not on the monitor connected to a.corp (local machine). Is there a way to force the display to appear on the monitor of the local machine (a.corp)?