0

When I ssh to a server using -X, I am always confused about which display number I should export. It seems to me sometimes the display number has been used by something, so what I can do is only go through:

export DISPLAY=localhost:0 && xclock  
export DISPLAY=localhost:1 && xclock  
export DISPLAY=localhost:2 && xclock  
export DISPLAY=localhost:...

until the clock appears. I will then use that display number. Each time I log into the server, the display number which is able to tunnel the GUI data correctly would be different.

1 Answer 1

2

sshd automatically sets $DISPLAY on the server side when X forwarding is enabled; there should be no reason for you to override its value.

1
  • Thanks! I will have to wait till next week when i can access the server and reply you back! Dec 27, 2010 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .