Automate the VNC Authorization Process Through the Command Line

I get input as vnc: //172.16.41.101& passwd = test

What I want to do with this input:
1. Extract the IP address.
2. Remove the password.
3. Run vncviewer with the ip and password provided.
4. All this should be automated after receiving input.

extract ip and password easily. then I run vncviewer with the ip provided, but how can I pass the password to it without asking for the user password?

+3
source share
1 answer

Assuming (by tags) that you are using vncviewer from the command line, I think you could do something like this:

echo "password" | vncviewer -autopass host:display

: vnc://172.16.41.101& passwd = test

echo "test" | vncviewer -autopass 172.16.41.101
+2

Source: https://habr.com/ru/post/1792609/


All Articles