Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: How to use screen sharing remotely and securely' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: How to use screen sharing remotely and securely
Authored by: greenwing on Oct 01, '08 01:46:12PM

On 10.5 (and probably earlier revisions as well) this whole script can be replaced with a much simpler alias:

If you use tcsh add the following line to your .cshrc file:
alias vnc 'ssh -f -L 1200:localhost:5900 \!:1 sleep 10 ; open vnc://localhost:1200'

Similar things can be done using a shell function in bash.

The key is that the 'sleep 10' will cause the shell channel of the ssh connection to drop after 10 seconds, giving the local side 10 seconds to open the vnc connection. This prevents all the 'process control' from being required. The SSH connection will automatically drop when you close the VNC connection.

[ Reply to This | # ]