Configuring VNC on RHEL6

Purpose:
The purpose of this document is to show client and server configuration of vnc.


On Server Side, Install required software like tigervnc-server:
[admin@sunny ~]$ su -
Password:
[Enter your root password]
[root@sunny ~]# yum install tigervnc-server -y
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.0.90-0.10.20100115svn3945.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================
Package Arch Version Repository Size
========================================================================
Installing:
tigervnc-server x86_64 1.0.90-0.10.20100115svn3945.el6 local 1.0 M

Transaction Summary
========================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 1 M
Installed size: 3.4 M

Downloading Packages:
(1/1): tigervnc-server-1.0.90-0.10.20100115svn3945.el | 1.0 MB 00:00
-----------------------------------------------------------------------------
Total 8.0 MB/s | 1.0 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-server-1.0.90-0.10.20100115svn3945.el6.x86 1/1
Installed:
tigervnc-server.x86_64 0:1.0.90-0.10.20100115svn3945.el6
Complete!
[root@sunny ~]#



Now switch to a general user so that we can set a general vnc password for that user:
[root@sunny ~]# su - admin
[admin@sunny ~]$ vncpasswd
Password: [Enter vnc password for admin user]
Verify: [Verify that admin password]
[admin@sunny ~]$ exit
logout



Now we need to add a display in vncservers config file:
[root@sunny ~]# vim /etc/sysconfig/vncservers 

In this file make an entry as ==> VNCSERVERS="2:admin"

If you want then you can also give display arguments.
Example: # VNCSERVERS="2:myusername"
              # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"


Start the service and make that available after reboot also.
[root@sunny ~]# chkconfig vncserver on
[root@sunny ~]# service vncserver start
Shutting down VNC server: [ OK ]
Starting VNC server: 2:admin xauth: creating new authority file /home/admin/.Xauthority
New 'sunny.redhat.com:2 (admin)' desktop is sunny.example.com:2
Creating default startup script /home/admin/.vnc/xstartup
Starting applications specified in /home/admin/.vnc/xstartup
Log file is /home/admin/.vnc/sunny.example.com:2.log
[ OK ]
[root@sunny ~]#



Now lets talk about the client side, on client side we just need vnc package:
[root@client ~]# yum install tigervnc
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
local | 3.7 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package tigervnc.x86_64 0:1.0.90-0.10.20100115svn3945.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved
========================================================================
Package Arch Version Repository Size
========================================================================
Installing:
tigervnc x86_64 1.0.90-0.10.20100115svn3945.el6 local 244 k
Transaction Summary
========================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 244 k
Installed size: 611 k
Is this ok [y/N]: y
Downloading Packages:
tigervnc-1.0.90-0.10.20100115svn3945.el6.x86_64.rpm | 244 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tigervnc-1.0.90-0.10.20100115svn3945.el6.x86_64 1/1

Installed:
tigervnc.x86_64 0:1.0.90-0.10.20100115svn3945.el6
Complete!


Now we need to check whether our vncserver is working or not ? Just fire this command:
[root@client ~]# vncviewer 192.168.86.128:2

It will display a dialogue box in which it will ask you for a password enter the password which you did set on server via vncpasswd command in the above section.

Comments

  1. Well It Was Very Good Information For Linux Learners.i Was Really Happy See This Information We Are Also Provide Linux Online Training All Courses.

    ReplyDelete
  2. Fantastic blog,very useful information to us,thank you for sharing this blog.For more info visit our website.
    Linux Admin Training in Hyderabad

    ReplyDelete

Post a Comment

Popular posts from this blog

Installing Tomcat8 on RHEL6

Manage existing resources via Helm

Configuration and setting-up of AIDE on RHEL6