VNC Remote Desktop: Advanced question

The_Mage18

[H]ard|Gawd
Joined
Jul 31, 2004
Messages
1,712
I already have VNC setup with Gnome running on the VNC sessions. :cool:
They run as root... :eek:

Anyone of you out there have experience in forcing a login screen within the VNC session? Ideally I'd like to have a password for the VNC connection, then the graphical login greeter like you get at the console once VNC connects. Picky, ain't I? :D
 
yes, you can use the xinetd superdaemon to start the Xvnc process as opposed to the vncserver script and get the normal greeter.

I have the config instructions at work, if you still need the info I will type it up tomorrow.
 
Could you post it, email, or PM me the instructions too. I would be interested in knowing how too.
 
mattjw916 said:
yes, you can use the xinetd superdaemon to start the Xvnc process as opposed to the vncserver script and get the normal greeter.

I have the config instructions at work, if you still need the info I will type it up tomorrow.

Yeah that would be helpful if you have it. Send me a PM and I'll post it on the web with credit to you. I figure that way you won't have to put up with a flood of PM's and posts asking for the info. :D
 
bleh... sorry for the late response, I have been swamped at work... I'll go and find it now...
 
okay here we go
Code:
# vi /etc/services
add the following line to the end
Code:
vnc        5904/tcp            # vnc
create the file /etc/xinetd.d/vnc and enter the following in it
Code:
    #default: on
    #description: It's the VNC server... duh...
          
          service vnc
        	 {
       		  flags		= REUSE
       		  protocol	 = TCP
        		  port		 = 5904
        [/font][font=Courier New]		  socket_type  = stream
        		  wait		 = no
        [/font][font=Courier New]		  user		 = root
        		  type		 = unlisted
        		  server	   = /usr/bin/Xvnc
 		 server_args = -inetd -query localhost -once -geometry 1024x768 -depth 24 -rfbauth /root/.vnc/passwd
        [/font][font=Courier New]		  disable	  = no
        	 }
        [/font][font=Courier New]
continuing on... modify the following file
Code:
# vi /etc/X11/gdm/gdm.conf
and add/check/verify the following
Code:
       [XDMCP]
       Enable=true
       HonorIndirect=true
       
       [greeter]
       quiver=1
       
       [servers]
       1=Standard
       2=Standard
restart xinetd and gdm
Code:
      #service xinetd restart
      #gdm-restart
you can test to see if it worked by attempting to telnet to the port on the host that VNC is listening on, in this case 5904
Code:
      #telnet [i]hostname [/i]5904
         Trying [i]IPaddress...
         [/i]Connected to [i]hostname.
         [/i]Escape character is '^]'.
         RFB 003.008
If that worked, then hit ^] and type quit

Once you have establised a successful connection you can also uncomment the lines specified in ~/.vnc/xstartup

I put this all together from a ton of crap I googled for, so don't blame me if it hoses your system, or creates a massive security hole, since I only use it on a trusted private network. ;)

I think this is it... when I get home I'll try my own instructions on a virgin system and see what happens.

Cheers,

Matt@HP

P.S. You'll need to create a VNC password ahead of time too since the Xvnc is using the rbauth argument so, IIRC the command # vncpasswd yourpassword should do it.
 
mattjw916 said:
and add/check/verify the following
Code:
       [XDMCP]
       Enable=true
       HonorIndirect=true
       
       [greeter]
       quiver=1
       
       [servers]
       1=Standard
       2=Standard

That's the only thing different from my current setup. I'll implement this Friday night and test it.
 
Back
Top