R:Re: vncserver startup at boot
Rick Stevens
rstevens at vitalstream.com
Tue Feb 24 20:13:30 UTC 2004
Stewart Walker wrote:
> Stewart Walker wrote:
>>
>> Stewart Walker wrote:
>> > if I run vncserver as root.. viewer works fine. If I run it as a service
>> > viewer responds with failed to connect to server.
>> > I think its due to not finding the files vncserver creates in the
>> > /root/.vnc directory.
>> >
>> > How do I fix this?
>>
>> > >Er, how do you mean "run it as a service"?
>>
>> Its selected in the Service configuration or [@>]service vncserver start.
>> which displays OK but no client connection are possible.
>
>> >>>After you do that, can you do a "ps -ax | grep vnc" and see what lines
>> >>>pop up?
>
> vncserver started during boot - ps aux |grep vnc or Xvnc .. no results.
>
> Same goes for ... service vncserver start ...
> and the client can not connect.
> then
> logged in as root at the root home prompt .. just typing vncserver
> starts the vncserver AND the client is able to connect.
>
> ps aux |grep vnc results are ..
> 2531 /ts/1 S 0:00 Xvnc :1 -desktop X -http /usr/share/vnc/classes
> -aut
>
> see below for /etc/sysconfig/vncservers
>
>> >>>If any do (beyond the line containing "grep"), please post them
>> >>>so I can see what's up.
>
>> if I do [@>]vncserver as root its does it thing and clients can connect.
>>
>> What file are the below mentioned options set in?
>> Took a look at /etc/rc.d/init.d/xinetd and didn't find any thing for Xvnc.
>> nothing in /etc/rc.d/init.d/vncserver.
>>
>> Where does the displaynumber stuff get set as ":0" is the console.
>
>> >>>Well, the stuff is in /etc/sysconfig/vncservers. The file should
>> >>>contain a line:
>
>> >>> VNCSERVERS="1:username1 2:username2"
>
> VNCSERVERS="1:username" is commented out in the vncservers file.
> Guess thats the problem..
> header says not to use this if connected to the internet so guess I'd
> better check out doing ssh.
Yes, do that. If you're on the internet, do NOT use vnc over an
insecure connection. Use the "vncviewer -via sshserver hostname:1"
syntax.
If you still are unsure about how to get this to work using the standard
Red Hat startup scripts, add a "vncserver >/dev/null 2>&1" to the end of
the "/etc/rc.d/rc.local" script.
> How do I tell what user vncserver is running as when the service is started
> at boot time.
A "ps -ef | grep Xvnc" should result in something like:
root 26518 1 0 11:40 pts/10 00:00:00 Xvnc :1 (truncated)
indicating you have an Xvnc process watching for connections to desktop
display ":1" and it's running as the "root" user (first column).
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens at vitalstream.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Tempt not the dragons of fate, since thou art crunchy and taste -
- good with ketchup. -
----------------------------------------------------------------------
More information about the Redhat-install-list
mailing list