Advertisement

07.01.2003 at 03:02AM PDT, ID: 20665087
[x]
Attachment Details

perl vnc/ssh script

Asked by barkerben in Perl Programming Language

Tags: perl, script

At the moment I can connect via VNC to my work (Unix) from home (Windows). However, to do this I have to:

1) open an ssh terminal conection
2) start the vnc server
3) Note the display I have been allocated
4) Set up an ssh tunnel to the necvcesary display
5) Launch the vnc viewer

It seemed to me that since this process is so repetative, it ought to be possible to write a script to do it for me - just requiring password and username to be entered once, and doing thje rest automatically - minor problem, I know very litle about
perl scripting. The first (of many, I expect) problems is that because of the way the server has been installed, if I log out, the vncserer  is killed. Therefore,
I need to be able to ssh in, get the display number, and then leave the process running until the tunnel is set up, so that at no point do I log out. This would involve
running 2 processes at once, and as I understand is, system() waits for the process to end before continuing.

This may well be the first of many questions to the forum on this topic ......

Cheers,

Ben

Start Free Trial
[+][-]07.01.2003 at 07:22AM PDT, ID: 8834110

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, script
Sign Up Now!
Solution Provided By: tosch
Participating Experts: 3
Solution Grade: B
 
 
[+][-]07.02.2003 at 01:28AM PDT, ID: 8838066

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.10.2003 at 11:55AM PDT, ID: 8895650

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.10.2003 at 02:26PM PDT, ID: 8896859

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.18.2003 at 10:01PM PST, ID: 9776567

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32