[lug] VNC and gdm

Harris, James James_Harris at maxtor.com
Wed Oct 10 13:12:10 MDT 2001


Alrighty, here's what I did to make this puppy work.  Most is duplicate info
that can already be found, but hey...

Enable xdmcp on gdm...
in gdm.conf:

[xdmcp]
Enable=1

Add the port to the services file...
in /etc/services:

vnc             5950/tcp

On RH6.2 and up (xinetd), create the xinetd vnc server...
In /etc/xinetd.d, create file named vnc:

# description: runs a vnc server connecting to the local xdmcp service
# adjust the server_args -geometry and -depth to meet your needs, more
# args can be found from: Xvnc -help
service vnc
{
        socket_type             = stream
        protocol                = tcp
        wait                    = no
        user                    = nobody
        server                  = /usr/local/bin/Xvnc
        server_args             = -inetd -query <servername> -geometry
800x600 -depth 8
        log_on_success          += USERID
        log_on_failure          += USERID
        disable                 = no
}

Copy/link the vnc java class files over to your web server.  I linked
/var/www/httpd/vnc to /usr/local/vnc/classes so I could go to
http://server/vnc for access.

Copy the index.vnc to index.html
Edit index.html to look something like this (strip the comment off the top):
<HTML>
<TITLE>
Whatever you want in here. I put in: VNC Console @ *servername*
</TITLE>
<APPLET CODE=vncviewer.class ARCHIVE=vncviewer.jar
        WIDTH=800 HEIGHT=600>
<param name=PORT value=5950>
</APPLET>
</HTML>

...Change your width and height to match the geometry of your vnc server...
...You can obviously spiff this up a bit, but this'll get the basics going.

And that's it.  Restart gdm and xinetd.  Go to your web server/vnc (in this
example) and you'll get the vnc applet.  It asks for a login, and from
researching this, it appears that there is no way to get rid of this,
however, you can leave it blank and click OK to get to the gdm login screen.

I believe you can pass -auth <filename> to the server_args, create a
password file and then distribute that shared password to those who should
be using VNC.  They'll obviously still have to legitimately login to the
server either way, but this could be a deterant to those that shouldn't even
be poking at it.  I tried this and it did not work off the bat, so there may
be more to it.  It's a starting point...

And that's all.  The key for what I was needing was the java applet piece.
Credit goes to: http://www.dei.isep.ipp.pt/~andre/extern/ixvnc.htm for
leading me to use the applet.  (Also gives a good example of using several
servers for different bandwidth situations, as well as good examples of how
to create the vnc .conf entries for the older inetd.

Regards,
Jim Harris

-----Original Message-----
From: Harris, James [mailto:James_Harris at maxtor.com] 
Sent: Tuesday, October 09, 2001 16:03
To: Boulder Linux Users Group (lug at lug.boulder.co.us)
Subject: [lug] VNC and gdm


Hi all-

I've been trying to setup a VNC server to be run from gdm.  I've dug around
the net a whole bunch and everyone seems to be having the same problem: they
set it up, the vncXserver gets launched, but no gdm login screen is actually
presented -- just a blank screen as if X doesn't have a window manager. I've
added VNC to xdm, and it works just fine, but I'm trying to sell the idea to
some management and xdm is "too ugly."

Here's what I have in gdm.conf:
[servers]
1=/usr/local/bin/Xvnc :1 -depth 8 -geometry 800x600 -httpd
/usr/local/vnc/classes

Here's what I put in Xservers for xdm that works:
:2 local /usr/local/bin/Xvnc :2 -depth 8 -geometry 800x600 -httpd
/usr/local/vnc/classes

I've searched through Google, newsgroups and a whole bunch o' other
resources and it appears that no one has the answer.  Has anyone here
battled this and found one?  I've looked at the inetd option for VNC, but I
can't see any way that I would use it to provide a web accessible session?
Does anyone have any ideas on how I could use it in this manner?  The
ultimate goal is to get a clean gdm style login using a web browser -- and
the compression advantages of VNC would be nice for remote administration.

I guess if I find out that I'm SOL, I'll try to spiff up xdm a bit ... But
it's been a looong time and I'd prefer the flexibility of gdm.

As usual, thanks a million!

James Harris
Systems Administrator
Network Operating Systems Group
EDS @ Maxtor Corporation
303.702.3853
_______________________________________________
Web Page:  http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list