Hello all,
Here's where I'm trying to get to: I want to be able to make a VNC connection to a Red Hat 9 box (call it Sammy) and have the GDM login screen displayed.
I have successfully done this on a different Red Hat 9 box (call it Billy) by doing the following:
1. Added the following line to /etc/services:
2. Created a file /etc/xinetd.d/vnc:
Code:
service vnc
{
socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024x768 -depth 16
log_on_success += USERID
log_on_failure += USERID
disable = no
}
3. Enabled XDMCP using the gdmsetup utility.
When I do the exact same thing on Sammy and try to connect with a VNC client, I get an "Invalid Protocol" error message. I read that "Invalid Protocol" simply means, "The server said something I didn't understand." Attempting to telnet to Sammy on port 5901 exposed the real problem:
Code:
Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock and start again.
This is understandable, because display :0 is being used by the GDM login on Sammy's local console. However, all the info I can find about "Xvnc -inetd" says something like, "Xvnc will find a free display and start on it...". Why does it insist on trying to use display 0? On Billy, no problems... Xvnc will start on display :1 first, and keep finding unused display numbers up to the max number of users allowed. Why might it pick the right display on one machine but not on the other?
Now, there are
some differences between the two machines: Billy was a fresh install of Red Hat 9, while Sammy was upgraded from an earlier release (7.3 I think). Billy was set up to use GDM graphical login at install time, while Sammy was converted later by changing id:3:initdefault: in /etc/inittab to id:5:initdefault:. Both are running the same version of VNC (3.3.3r2-47).
I have investigated the /etc/rc.d/init.d/vncserver script and /etc/sysconfig/vncservers, but my understanding is that these do not apply when Xvnc is started by xinetd. So... how does "Xvnc -inetd" learn which displays are unused? How can I best teach this slow learner?
Thanks for your time. I'd be happy to post additional info if needed.