[CentOS] tightvnc server fails to start

Robert Moskowitz rgm at htt-consult.com
Tue Nov 25 21:14:50 UTC 2008


I tried to use tightvnc back in August and had some help, but I stopped 
due to IPv6 support.  Now I am back at tightvnc and cannot get the 
server started.  This is on a new Centos install that did have regular 
vncserver working on it (I did a yum erase vnc-server first).

So I have a working /etc/sysconfig/vncserver and my user has the 
appropriate ~/.vnc files that worked with regular vnc.

Logged in as root, I issue:  service vncserver start

and get:

Starting TightVNC remote administration daemon (Xvnc):2:root WARNING: 
initlog is deprecated and will be removed in a future
vncserver: The USER environment variable is not set.
                                                           [FAILED]



But there is a USER environment variable set:

set|grep USER

PROMPT_COMMAND='echo -ne 
"\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
USER=root

(remember, I am logged in as root so I can issue the service command)

And further in /etc/profile I have:

if [ -x /usr/bin/id ]; then
        USER="`id -un`"
        LOGNAME=$USER
        MAIL="/var/spool/mail/$USER"
fi



The only line in the /etc/sysconfig/vncservers is:

VNCSERVERS="2:user"

where user is the userid.




More information about the CentOS mailing list