• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11245
  • Last Modified:

CentOS / Gnome - Remote Desktop VNC questions

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,
2 Solutions
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

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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now