Home » Scripts » VNCViewer Script with a Graphical Password Prompt

VNCViewer Script with a Graphical Password Prompt

VNC Script with a Graphical Password PromptYou need to have launchers for VNCViewer connections to specific hosts? Here is a way to Launch a VNCViewer Script with a Graphical Password Prompt.

VNCViewer Script with a Graphical Password Prompt

I have a Menu item for hosts that I connect to frequently. SSH and RDesktop were simple enough, but when I’d try to use VNCViewer, the password prompt would die into the background process. To get around this I whipped up a simple shell script using VNCViewer to resolve this.

VNC Script with a Graphical Password Prompt

This script requires Zenity and XTightVNCViewer.

vi vnc-host.sh
#!/bin/sh
PASSWD=”$(zenity –password –title=Authentication)\n”
echo $PASSWD | vncviewer -autopass 192.168.91.19:1

The only downfall of this VNC Script with a Graphical Password Prompt is that I need to have a script for each VNC host in my menu.

 


unixsamurai.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Read our Privacy Policy for more info.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.