X11 display over ssh with monitor connected to remote machine
Posted
by
Sumit
on Super User
See other posts from Super User
or by Sumit
Published on 2012-11-06T16:34:25Z
Indexed on
2012/11/06
17:06 UTC
Read the original article
Hit count: 315
ssh
|x11-forwarding
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
$ ssh -X b.corp
$ xclock
Error: Can't open display:
I tried setting the DISPLAY variable as
$ 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)?
© Super User or respective owner