Kenan, The difference between the two cases isn't just the user you're running the desktop as, but also the method you're using to invoke the vncserver command, and the command-line you're giving it. I'd therefore suggest:
1. Testing whether "vncserver :1" works for root, e.g. sudo vncserver :1 2. Testing whether "vncserver -geometry 800x600 -nolisten tcp -nohttpd -localhost" works for root in a similar fashion. 3. Once you have got a command line that works, in (2), put that in the /etc/sysconfig/vncservers and try starting it via /sbin/service again. Cheers, -- Wez @ RealVNC Ltd > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: 10 November 2008 07:35 > To: [email protected] > Subject: vncserver works when started as user, but not as root. > > 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): > > [EMAIL PROTECTED] mythtv]# netstat -tulpan | grep vnc > [EMAIL PROTECTED] 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): > > [EMAIL PROTECTED] 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! > _______________________________________________ > VNC-List mailing list > [email protected] > To remove yourself from the list visit: > http://www.realvnc.com/mailman/listinfo/vnc-list _______________________________________________ VNC-List mailing list [email protected] To remove yourself from the list visit: http://www.realvnc.com/mailman/listinfo/vnc-list
