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.

 

Was this helpful?
If you found my posts interesting, or I helped you figure something out, please consider tossing me a tiny gratuity for my time, research, to help offset the web hosting/development costs or to buy me a cup of coffee.

* This post may contain affiliate links. This means that I “might” receive a tiny amount of money, if you make a purchase using one of our links. It does not cost you anything extra, and helps us defray the costs of hosting and maintaining this site.

Leave a Reply