• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Life always offers you a second chance ... Its called tomorrow !!!

    Friday, August 10, 2012

    How to configure VNC server in Linux (Red Hat)

    Virtual Network Computing (VNCis a graphical system that is used to remotely control another computer. It transmits the mouse and keyboard events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.

    Prerequisites before starting the configuration of VNC server in CentOS 5:

    Make sure the required packge is installed in the machine.
    # rpm -qa | grep vnc
    If you do not get the output packages then install then using yum
    # yum -y install vnc-server
    Once the package is installed these are the steps you need to follow
    # vi /etc/sysconfig/vncservers
    on the line 20
    VNCSERVERS="2:root" <== give the username of the user by whom you want to use vncserver as in my case root

    Assign a password for the vncserver for the root user
    # vncpasswd
    Password:
    Verify:

    and restart your vncserver using this command
    # service vncserver restart
    If the service starts without any error then you can move to the next step or else check for the log messages which you can find in
    # less /var/log/Xorg.0.log
    Now I will assume that the service started without any error So for the next step
    # vi /root/.vnc/xstartup
    # go to line no. 5 and uncomment it
    exec /etc/X11/xinit/xinitrc <===uncomment this line

    save and exit
    Restart the service# service vncserver restart
    open the client software i.e vnc client



    Prerequisites before starting the configuration of VNC server in CentOS 6:

    The vncserver package in CentOS 6 and RHEL 6 is different as compared to earlier versions to which most of us get confuse.
    Installing vnc-server rpm
    # yum -y install tigervnc-server
    Once the package is installed
    # vi /etc/sysconfig/vncservers
    on the line 18
    VNCSERVERS="2:myusername" <== give the username of the user by whom you want to use vncserver as in my case root

    Assign a password for the vncserver for the root user
    # vncpasswd
    Password:
    Verify:

    and restart your vncserver using this command
    # service vncserver restart
    In CentOS 6 you do not need to edit any other file from here you can use the same steps as I described earlier using the client software to connect your vncserver.


    Related Articles
    usr/bin/Xvnc: undefined symbol: pixman_composite_trapezoids
    Running multiple VNC server sessions for different users in Linux
    You'll have to kill the Xvnc process manually


    Follow the below links on more helpful tutorials

    Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to configure Samba 4 Secondary Domain Controller
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    Red hat Enterprise Linux 5.5 Installation Guide (Screenshots)
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    What is swappiness and how do we change its value?
    How to log iptables messages in different log file
    What are the s and k scripts in the etc rcx.d directories
    How to check all the currently running services in Linux
    How to auto start service after reboot in Linux
    What is virtual memory, paging and swap space?

    0 comments:

    Post a Comment