vncserver works when started as user, but not as root.
kenan.ezal@cox.net
kenan.ezal "at" cox.net
Mon Nov 10 07:36:01 2008
Hi,
I am able to successfully connect from a client PC (Fedora 9) to the remote machine (Fedora 9) using
$ vncviewer 192.168.101.153:5901
provided I am logged in as as user (not root) and start my vncserver as
$ vncserver :1
However, I am unable to complete the connection if I start the vncserver while logged in as root:
# /sbin/service vncserver start
I have modified (as root)
/etc/sysconfig/vncservers
to include:
VNCSERVERS="1:mythtv"
VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
where mythtv is the user name.
The following output is for the first case ($ vncserver :1):
[root "at" MythTV2 mythtv]# netstat -tulpan | grep vnc
[root "at" MythTV2 mythtv]# netstat -tulpan | grep vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 3727/Xvnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 3727/Xvnc
tcp 0 0 :::6001 :::* LISTEN 3727/Xvnc
The following output is for the second case (# /sbin/service vncserver start):
[root "at" MythTV2 mythtv]# netstat -tulpan | grep vnc
tcp 0 0 127.0.0.1:5901 0.0.0.0:* LISTEN 3653/Xvnc
Can someone tell me what I'm doing wrong. Why does it work in one case, but not the other?
My primary goal is to get the vncserver to start automatically at boot time.
Thank you!