[auton-users] Using VNC with SSH

Donghan (Jarod) Wang donghanw at cs.cmu.edu
Wed May 9 15:37:07 EDT 2012


Hello lab,

This post is intended for VNC users. If you ever use vncserver and/or
vncviewer, you are a VNC user.

Suppose you want to open a VNC connection to snoopy; the following two
steps offers a secure and convenient way.

    Step 1:    *ssh -L 5902:localhost:5901 snoopy*

and any references to display :2 on your local machine would actually
connect to display :1 on snoopy. Recall that VNC normally uses port 59xx,
where xx is the display number of the server. Make sure that the local
port, 5902 in this case, is _not_ being used.

After that, you could run:

    Step 2:    *vncviewer localhost:2*

instead of running a vncviewer:

    vncviewer snoopy:1
That's it. This tip works on LInux and cygwin on windows.

P.S. If you need to find out display port on snoopy, 5901 in this case, one
way is to run
ps aux | grep -i vnc
and look for the number after -rfbport.

-Jarod


-- 
Donghan (Jarod) Wang
Research Programmer
Robotics Institute
Carnegie Mellon University
5000 Forbes Avenue
Pittsburgh, PA 15213
Email: donghanw at cs.cmu.edu
Tel: +1 412 268 1238
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.srv.cs.cmu.edu/mailman/private/autonlab-users/attachments/20120509/95546bcb/attachment.html>


More information about the Autonlab-users mailing list