Jan 13, 2011

Configure VNC on XINETD with XDMCP

Configure VNC on XINETD with XDMCP


Release:
RedHat Enterprise Linux 5

Problem:
Need to configure VNC based on xinetd with XDMCP for GDM access

Solution:

1)      1) Install the required packages

# yum install vnc-server xinetd

2)      2) Enable the XDMCP by editing the custom.conf file

# vi /etc/gdm/custom.conf

[xdmcp]
Enable=true
MaxSessions=30

[security]
AllowRemoteRoot=true
DisallowTCP=false

Note: Here “AllowRemoteRoot=true” used to allow root access.

3)      3) Create a file with below content, in inside the /etc/xinetd.d directory

# vi /etc/xinetd.d/xvncserver

service vnc
{
disable = no
protocol = tcp
socket_type = stream
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd –query localhost –once –geometry 1024x768 –depth 16 securitytypes=none
}

4)      4) Define the vnc01 service by edit the /etc/services file

# vi /etc/services

vnc   5950/tcp

5)      5) Restart the xinetd and gdm services

# service xinetd restart
# gdm-restart

6)      6) Test using the vncviwer command

# vncviewer localhost:5950

7) To connect from the remote system use the below one

# vncviewer IPADDRESS:5950

1 comment:

Horsie said...

I am using this method to get remote VNC/XDMCP sessions, and it works great. Can you tell me the best way to clean up a "hung" session, though? Sometimes my network hiccups, and I lose my connection, and the next time I log in, it tells me I am already logged in.

Thanks for a great post.