On Thu, 19 Jul 2001, Federico Sevilla III wrote:

> On Thu, 19 Jul 2001 at 14:29, Mark Anthony J. Mercado wrote:
> > it's very great. especially when you couple it with inetd and xdm (or
> > kdm).
> 
> How do you make xdm handle logins and pass them to the vncserver? Maybe
> you could expound on your setup? I do believe a number of people on the
> list would appreciate details on this.
> 


my workstation is based on slackware 7.1 with XFree86 4.01 .

I followed what's on VNC's site... so what I did was:

1. add to /etc/services

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

these are just names so we could run vnc in inetd/xinetd

2. I'm using inetd so I add this

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-800x600x16  stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once -geometry 800x600 -depth 16


running Xvnc -h would show more parameters. just don't forget to ALWAYS
include once  or else you'll have stale servers around :(

then bounce inetd


3. permit xdm to respond to XDMCP requests. My default configuration
doesn't. Default installations of Mandrake 8 DO reply to broadcast queries
(which IMHO, is a security risk). I learned this by having the -broadcast
parameter in Xvnc and when I tried connecting to my desktop via vnc, I saw
my co-worker's login screen !

so I edited my /etc/X11/xdm/Xaccess

I just added these two lines at the end

localhost
hostname

(of course you have to replace the hostname with yours)

4. make sure your xdm or kdm is listening on UDP 177 (XDMCP port) . If
not, you have to add this to your /etc/X11/xdm/xdm-config

DisplayManager.request-Port: 177

in my case I also added this

DisplayManager*authorize:       true

so xdm would allow me to authenticate using all displays (but I'm not
really sure that this was needed. cound anybody confirm ?)


bounce xdm (or kdm or whatever you're using)

5. I now try to connect to the server via VNC. To access a 640x480, 8 bit
display, you have to connect using

    hostname:50

for the 800x600, 8bit

    hostname:51

for the 800x600, 16bit

    hostname:52


you should see the login screen. neat eh ?

What I like is that the servers are created on demand. The downside is, if
the vnc client crashes, so does your desktop. If you'd like your desktop
to persist, you just have to login to the box via ssh or telnet then run
the command vncserver manually.

In my tests, it's much more stable to run some lightweight VM instead or
KDE or GNOME. In my case, i'm using Window Maker but YMMV.


hth,

Mark

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to