I had this error when installing and running a vncserver before, which I have now removed. However, the xterm's seem to remain in the system and are regenerating themselves.
Should the pid IDs stay the same each time I run this?

Code:
[root nxserver]# pidof xterm
15034 15033 15032 15031 15030 15029 15028 15027 15026
[root nxserver]# pidof xterm
15044 15043 15042 15041 15040 15039 15038 15037 15036
[root nxserver]# pidof xterm
15054 15053 15052 15051 15050 15049 15048 15047 15046
[root nxserver]#

Just before that I killed the vnc server so not sure what this could be.

Code:
[root nxserver]# /sbin/service vncserver stop
Shutting down VNC server: 1:jason                          [  OK  ]
[root nxserver]# pidof xterm
15010 15008 15006 15004 15002 15000 14998 14995 14994
[root nxserver]# kill -9 14994
-bash: kill: (14994) - No such process
[root nxserver]# pidof xterm
15034 15033 15032 15031 15030 15029 15028 15027 15026
[root nxserver]# pidof xterm
15044 15043 15042 15041 15040 15039 15038 15037 15036
[root nxserver]# pidof xterm
15054 15053 15052 15051 15050 15049 15048 15047 15046

[root nxserver]# pidof vncserver

[root nxserver]# /sbin/service vncserver stop
Shutting down VNC server: 1:jason                          [FAILED]
[root nxserver]#
The centos wiki has this, which I'm sure it's linked to but having turned off VNC, shouldn;t this code also be cancelled?
Code:
#!/bin/sh
# Add the following line to ensure you always have an xterm available.
( while true ; do xterm ; done ) &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
WIKI: google centos how to vnc server (I can't post a link here yet)