Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by downloading our premium books in PDF format
  6. Support us by taking our online Linux course in 5 Days

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

35 Responses

  1. Aktar Alam says:

    Hi Ravi,
    I followed your steps.
    it worked fine ….
    But my requirement was to configure the multiple vnc clients for the same user. For e.g say user techmint.
    So i added entry for the same in /etc/sysconfig/vncservers file as:
    VNCSERVERS=”1:techmint 2:techmint”
    VNCSERVERARGS[1]=”-geometry 1280×1024″
    VNCSERVERARGS[2]=”-geometry 1280×1024″

    After restarting the service I am getting black and X as cursor.
    Could you help me out???

    • Ravi Saive says:

      @Aktar,

      I think you can’t create multiple VNC sessions for same user, have you tried with different multiple users? is the VNC sessions worked for all?

      • Aktar Alam says:

        Hi Ravi,

        Thanks for the reply.
        I am able to create multiple VNC sessions for same user and currently I got them working by modifying the xstartup file .
        My xstartup file contents are below:
        #!/bin/sh

        # Uncomment the following two lines for normal desktop:
        unset SESSION_MANAGER
        exec /etc/X11/xinit/xinitrc
        gnome-session &
        [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
        [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
        xsetroot -solid grey
        vncconfig -iconic &
        #xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
        #twm &

        my vncservers file content is :
        [root@mybox1 ~]# cat /etc/sysconfig/vncservers
        # The VNCSERVERS variable is a list of display:user pairs.
        #
        # Uncomment the lines below to start a VNC server on display :2
        # as my ‘myusername’ (adjust this to your own). You will also
        # need to set a VNC password; run ‘man vncpasswd’ to see how
        # to do that.
        #
        # DO NOT RUN THIS SERVICE if your local area network is
        # untrusted! For a secure way of using VNC, see
        # .

        # Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.

        # Use “-nohttpd” to prevent web-based VNC clients connecting.

        # Use “-localhost” to prevent remote VNC clients connecting except when
        # doing so through a secure tunnel. See the “-via” option in the
        # `man vncviewer’ manual page.

        # VNCSERVERS=”2:myusername”
        # VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
        VNCSERVERS=”1:user1 2:user1 3:user1 4:user1 5:user1 6:user1″
        VNCSERVERARGS[1]=”-geometry 1280×1024″
        VNCSERVERARGS[2]=”-geometry 1280×1024″
        VNCSERVERARGS[3]=”-geometry 1280×1024″
        VNCSERVERARGS[4]=”-geometry 1280×1024″
        VNCSERVERARGS[5]=”-geometry 1280×1024″
        VNCSERVERARGS[6]=”-geometry 1280×1024″

        Now my issue is that I am able to invoke only two sessions for third session it flags below error:
        A VNC server is already running as :3

        • Ravi Saive says:

          @Aktar,

          Thanks for sharing your findings and configuration of both files, hope it will help others who looking for similar problems, about multiple VNC sessions for same users, i really don’t have idea, i need to check and get back to you..

  2. Michael Tagui says:

    Thanks a lot man, i really like your tutorial, it really makes the installation very easy…
    You deserve 100 stars

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's