One more time, StartingVNC at boot in linux - AGAIN!!

Jeff Vincent JVINCENT "at" novell.com
Mon, 14 Jan 2002 21:53:07 +0000


Here is a snipet of the files I have: (last send cut it off after the
first section.  Weird!)
####################################
#services.vnc - appended to /etc/services
#
# VNC Servers
#
vnc-640x480x8   	5950/tcp
vnc-800x600x8   	5951/tcp
vnc-1024x768x8 	5952/tcp
vnc-1280x1024x8 	5953/tcp
vnc-1600x1200x8 	5954/tcp
 
.
.
.
<continue with all color depths/resolution combinations
####################################

####################################
#vncserver.inetd - APPENDED to /etc/inetd.conf
#
# VNC XServer
#
vnc-640x480x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once -geometry 640x480 -depth 8
vnc-800x600x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once -geometry 800x600 -depth 8
vnc-1024x768x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once -geometry 1024x768 -depth 8
vnc-1280x1024x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc
-inetd -query localhost -once -geometry 1280x1024 -depth 8
vnc-1600x1200x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc
-inetd -query localhost -once -geometry 1600x1200 -depth 8
# 
.
.
.
<continue with other services as defined in /etc/services
####################################

####################################
#vncserver.xinetd - this is a stand-alone file copied to
/etc/xinetd.d/

service vnc-640x480x8 
{
	protocol = tcp
	socket_type = stream
	wait = no
	user = nobody
	server = /usr/local/bin/Xvnc
	server_args = -inetd -query localhost -once -geometry 640x480
-depth 8
}
service vnc-800x600x8 
{
	protocol = tcp
	socket_type = stream
	wait = no
	user = nobody
	server = /usr/local/bin/Xvnc
	server_args = -inetd -query localhost -once -geometry 800x600
-depth 8
}
service vnc-1024x768x8 
{
	protocol = tcp
	socket_type = stream
	wait = no
	user = nobody
	server = /usr/local/bin/Xvnc
	server_args = -inetd -query localhost -once -geometry 1024x768
-depth 8
}
service vnc-1280x1024x8 
{
	protocol = tcp
	socket_type = stream
	wait = no
	user = nobody
	server = /usr/local/bin/Xvnc
	server_args = -inetd -query localhost -once -geometry 1280x1024
-depth 8
}
service vnc-1600x1200x8 
{
	protocol = tcp
	socket_type = stream
	wait = no
	user = nobody
	server = /usr/local/bin/Xvnc
	server_args = -inetd -query localhost -once -geometry 1600x1200
-depth 8
}
.
.
.
<continue on for all resolutions/color depths as defined in
/etc/services
####################################


>From what I have seen you use the -broadcast option which may or may
not work depending on how you have your choosers setup.  change it to
-query localhost so you only get a session from the box you attach to.

Additionally, I have seen errors similar to yours in two instances, 1)
the Xvnc file is not in the path specified or 2) the permissions on Xvnc
are not set to eXecutable both of which prevent xinetd from spawning the
process and hence the part of the error that says "no such process". 
That doesn't mean there aren't other reasons.  My Xvnc is in
/usr/local/bin on my RH 7.2 box.  I can't remember how I installed it
though.  I may have just copied Xvnc to that directory.

I also don't have the log_on_success and log_on_failure options for
xinetd so I don't know if or how they work.

Which display manager are you running?

Check those things and let me know how it goes.

Jeff

>>> janyne_kizer "at" ncsu.edu 01/14/02 10:18AM >>>
Jeff Vincent wrote:
> 
> Attached are the entries I use.  One file for services, one to use
with
> inetd and one to use with xinetd.  All are just the basics.  I also
> attached a rudementary installation description I have started for
> installing.  Eventually it may be more useful.
> 
> Hope it helps.
> 1) Install VNC
>         a) if installed to directory other than /usr/local/bin, edit
the vnc paths in
>            the 'vncserver.*' file.

Installed via RPM on RH 7.2 CD

> 
> 2) edit 'xdm-config' and comment out the line '!
DisplayManager.requestPort: 0' (should be the last line)
>         a) RedHat 7.1,7.2 - '/etc/X11/xdm/xdm-config'
> 
> 3) edit 'kdmrc' and enable XDMCP on port 177 (if kde is new enough)
>         a) RedHat 7.2 - '/etc/kde/kdm/kdmrc'
> 
> 3) edit Xaccess and uncomment the line '*               #any host can
get a login window'
>         a) RedHat 7.1,7.2 -' /etc/X11/xdm/Xaccess'

Done!  I know that XDMCP is working because it is allowing X
connections
from thin clients (diskless NCDs)

> 
> 4) append contents of 'services.inetd' to 'services'
>         a) Linux - '/etc/services'

I did not receive this file, however this is what my /etc/services
looks
like:

vnc-640x480x8   5950/tcp                        # vnc server IP
vnc-800x600x8   5951/tcp                        # vnc server IP
vnc-800x600x16  5952/tcp                        # vnc server IP  

> 
> 5) Update inetd configuration for the services to enable (based on
/etc/services)
>         a) inetd - append contents of 'vncserver.inetd' to
'/etc/inetd.conf'
>         b) xinetd - copy 'vncserver.xinetd' to '/etc/xinetd.d' (RH
7.2)

I did not recieve this file, however this is what my
/etc/xinetd.d/vnc-640x480x8 file looks like

service vnc-640x480x8
{
        disable                 = no
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = root
        server                  = /usr/bin/Xvnc
        server_args             = -inetd -broadcast -once -geometry
640x480 -depth 8
        log_on_success          += USERID
        log_on_failure          += USERID
} 

> 
> 6) reboot (or restart inetd/xinetd and xdm or equivalent)
>         a) xdm
>                 i) TODO: how to restart the xdm without rebooting?
>         b) xinet
>                 i) RedHat 7.1/7.2 - '/etc/init.d/xinet restart'

When I do this xinit restart command I get some errors:

_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't
already run
ning

When reporting a problem related to a server crash, please send
the full server output, not just the last messages.
This can be found in the log file "/var/log/XFree86.0.log".
Please report problems to xfree86 "at" xfree86.org.

Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
giving up.
xinit:  unable to connect to X server
xinit:  No such process (errno 3):  Server error. 

These errors seem to occur whether the vnc files are in the
/etc/xinetd.d direcotry or not :-(
-- 

Janyne Kizer
CNE-3, CNE-4, CNE-5
Systems Programmer Administrator I
NC State University, College of Agriculture & Life Sciences
Extension and Administrative Technology Services
Phone: (919) 515-3609
---------------------------------------------------------------------
To unsubscribe, mail majordomo "at" uk.research.att.com with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html 
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, mail majordomo "at" uk.research.att.com with the line:
'unsubscribe vnc-list' in the message BODY
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------