The script that starts vnc-server makes a call to another script that does the actual executing of VNC. However, this script spawns a child process that is the vnc server. Because the name of the executable changes.pidlist=`pidofproc $1` Example: (from /etc/init.d/functions) <snip> # Save basename. base=`basename $1` # Find pid. pid= for apid in $pidlist ; do [ -d /proc/$apid ] && pid="$pid $apid" done </snip> The basename of /usr/bin/vncserver is vncserver, while the actual executable is Xvnc. Note that Xvnc isn't the client (thats vncviewer). The only implication I've seen so far is that while trying to query the status of vncserver or kill/restart it, the script fails, not only not returning the status, but not killing the server. If the server has an another attempt to start before a reboot or manual removal of the Xvnc process, the new instances cannot grab the default :0 or :1 addresses and therefore may lead to confusion as to which Xvnc session is being accessed. -Ben Klang, KF4WBX ben
Created attachment 4674 [details] Here is a patch to fix this. Unfortunately, now that it _works_, 'service vncserver stop' will kill all Xvnc processes. :-(
I've put this patch in vnc-3.3.3r1-12.