When starting a vnc server, the vncserver script takes care of starting Xvnc with the right command line options. It returns the display number it has chosen for the new desktop session:
$ vncserver New 'linuxbox:4 (me)' desktop is linuxbox:4 Starting applications specified in /home/user/.vnc/xstartup Log file is /home/me/.vnc/linuxbox:4.log
It’s important to remember this number because you need it when using vncviewer or if you want to stop the server.
Well, not anymore when using vncmanager!!
Vncmanager integrates listing, starting and stopping vncservers. I initially wrote it to manage vncservers on a cluster of linux machines. The whole setup however, was quite site specific. The script basically queries all the linux nodes for information on running vncservers.
The version published here is adapted for use on a single machine.
The UI is done with dialog which allows you to display input boxes, menus etc. from shell scripts. For example, the following code generates the main menu of vncmanager:
dialog --backtitle "vncmanager" \
--title "Main menu" \
--output-fd 3 \
--menu "What would you like to do:" 15 65 6 \
1 "List my running VNC servers" \
2 "Start a VNC server" \
3 "Stop a VNC server" \
4 "Set my VNC password" \
5 "Quit"
And what’s a new script without screenshots ![]()

The multiple hosts version requires some work to make it less dependent on the cluster configuration. I’ll post it here soon.