How to Install and Configure X11 with Remote VNC Access in CentOS

The instructions below will walk you through the process of installing the X window system, GNOME desktop environment, and configuring VNC so that you can access it remotely.

 

yum -y upgrade
yum -y groupinstall "GNOME Desktop Environment"
yum -y install vnc-server

As a general rule of thumb you should never run X windows as root. In this example we will add a system user with the username 'colo' and configure X windows to run under that user.

 

adduser colo

Next you need to set a password for the user colo:

 

passwd colo123

Next we will drop down to the system user 'colo' using su and configure VNC. When running the vncserver binary you will again be asked to set a password. This will be the password you use in your VNC client.

 

su colo
vncserver

Next you need to edit /home/colo/.vnc/xstartup and uncomment the following two lines:

 

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

Next we want to restart VNC so the changes take affect

 

vncserver -kill :1
vncserver

That's it, you can now connect to your server using the server IP address with a :1 (the display port) at the end of it using your VNC client.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Is there a User's Guide available?

Yes! You can download the latest version of our CloudApp User's Guide here. (Note you will...