Set the DISPLAY to a specific screen


With multiscreen support a user can launch his connection to any screen he chooses. However, when running an ssh session it is important to tunnel the $DISPLAY so that your data is not sent over unencrypted.

In order to send your $DISPLAY to a specific screen, set your $DISPLAY to the tunnel when launching a new client.

example

echo $DISPLAY
localhost:10.0

xterm -display localhost:10.1 — this sends the DISPLAY to localhost:10.1 which is screen #1 through the tunnel

To do this automatically in one line, send your DISPLAY to the following script


`echo $DISPLAY | sed ‘s/\(:.*\)\..*/\1.###/’`

where ### is your Screen number

example

xterm -display `echo $DISPLAY | sed ‘s/\(:.*\)\..*/\1.4/’`

will send your xterm tunneled to Screen 4