CentOS / Gnome - Remote Desktop VNC questions

Posted on 2006-05-08
Last Modified: 2013-12-15
I have CentOS 4.3 running Gnome.  I know that remote desktop works, but you have to be logged in.  I would like to know how to get remote desktop to work without being logged in or to get VNC to start a gnome session.

Thanks in advance,
Question by:ingenia
    LVL 20

    Accepted Solution

    In order to connect to your CentOS 4,3 box from remote PC via VNC viewer you have to make sure VNC server is running on CentOS box. VNC server service can be launched in any of four user levels ( 2,3,4,5 ) via init  scripts.
    In CentOS 4,3 terminal windows type :

    chkconfig --list    

    ( to get the list of all services currently running )

    To make sure also VNC server is ruining in runlevel(s) you're most likely to use type:

    chkconfig --level 235 vncserver on

    which will add  lines to init scripts for vnc server to be launched in runlevels 2, 3  and 5  ( 2-single user text mode, 3-multiuser text mode and 5-multiuser GUI mode) .

    good luck

    LVL 19

    Assisted Solution

    You may also need to edit the vncserver configuration file, I think it's called  /etc/sysconfig/vncservers so it has an entry for the users you want to start vnc for or the startup may fail (can't remember exactly what happens)

         vi /etc/sysconfig/vncservers

         VNCSERVERARGS[4]="-geometry 1024x768"

    The user `myusername` will then need to assign a password using vncpasswd.

    For gnome to start you may also need to edit the .vnc file in the users home directory;
         vi ~myusername/.vnc/xstartup

    change the twn& (or whatever it is) to;

         gnome-session &

    Once VNC is started you should be able to connect to the desktop defined in the vncservers file, eg `vncviewer`



    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now