Friday, 21 June 2013

How to create a shared VNC connection using xinetd

Hi all,

In this tutorial, we are going to create vnc connections which can be accessed by any users and which can be resumed at any point of time.

Also we can create vnc for individual users as well..

 1) Install the required packages

# yum install vnc-server xinetd

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

# vi /etc/gdm/custom.conf



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

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

# vi /etc/xinetd.d/xvncserver

service vnc
  type = UNLISTED
 disable = no
 socket_type = stream
 protocol = tcp
 wait = yes
 user = test1
 server = /usr/bin/Xvnc
 server_args = -inetd -query localhost  -geometry 1280x800 -depth 16 passwordfile=/etc/vncpasswd/Xvnc.pass2
 log_type = FILE /var/log/xinetdlog
 log_on_failure += USERID
 port = 5950

5)Now create a vnc password using the commands below.

mkdir /etc/vncpasswd/
vncpasswd /etc/vncpasswd/Xvnc.pass2
Then type the password you want to connect to vnc. It will be stored in that file.

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

# vi /etc/services

vnc   5950/tcp
7) Restart the xinetd and gdm services

# service xinetd restart
# gdm-restart
8) Test using the vncviwer command

# vncviewer localhost:5950
9) To connect from the remote system use the below one

# vncviewer IPADDRESS:5950

No comments:

Post a Comment