• 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.

  • 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.

    Deepak Prasad

    is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+


    Do you also have something to share here?
    Join GoLinuxHub Team as an Author, Click here for more information
    How to configure VNC server in Linux (Red Hat) How to configure VNC server in Linux (Red Hat) Reviewed by Deepak Prasad on Friday, August 10, 2012 Rating: 5

    No comments:

    Powered by Blogger.