Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automating VNC authorization process through command line

I am receiving a input as vnc://172.16.41.101&passwd=test

What i want to do with this input is :
1. Extract the IP address.
2. Extract the password.
3. Launch vncviewer with the ip and password provided.
4. All this should this be automated, once the input is received.

extracting the ip and password is easy. then i launch the vncviewer with the ip provided, but how do i pass the password to that without prompting the user for the password ?

like image 365
Arihant Nahata Avatar asked Feb 16 '11 19:02

Arihant Nahata


1 Answers

Assuming (by the tags) that you are using the vncviewer program from the command-prompt i think you could do something like this:

echo "password" | vncviewer -autopass host:display

using your example: vnc://172.16.41.101&passwd=test

echo "test" | vncviewer -autopass 172.16.41.101
like image 160
Bruno Flávio Avatar answered Sep 28 '22 09:09

Bruno Flávio