Virtual Network Computing (VNC) is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another. VNC is a open source software, compatible with Windows and Unix/Linux.
The server transmits a duplicate display of a remote computer to the viewer.
Step 1: Installing GNOME Desktop
yum groupinstall "X Window System" "Desktop"
or
yum groupinstall "GNOME Desktop"
Step 2: Installing TightVNC Server
yum install -y tigervnc-server
Step 3: Create User
useradd vncuser
passwd vncuser
Step 4: Set VNC password for User
su - vncuser
vncpasswd
Note : This password is for accessing VNC remote desktop, and the password we created in step 3 is for accessing SSH.
Step 5: Create VNC Xstartup Script
/etc/init.d/vncserver start
## output is like - Starting VNC server: 1:vncuser
New 'vncuser.com:1 (vncuser)' desktop is vncuser.com:1
Starting applications specified in /home/vncuser/.vnc/xstartup
Log file is /home/vncuser/.vnc/vncuser.com:1.log
[ OK ] ##
Note : check whether xstartup script is created under (vncuser) user’s home directory
ls- l/home/vncuser/.vnc
## Output is like - -rw-------. 1 vncuser vncuser 8 Jul 15 12:27 passwd
-rwxr-xr-x. 1 vncuser vncuser 654 Oct 11 2012 xstartup ##
Step 6: Set Xstarup Resolution (edit the file like below)
vi /etc/sysconfig/vncservers
VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 800x600"
To restart, status, stop the services
/etc/init.d/vncserver restart
/etc/init.d/vncserver status
/etc/init.d/vncserver stop
To check the status of running services
chkconfig
chkconfig vncserver on
Note : Chkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup.
The server transmits a duplicate display of a remote computer to the viewer.
Step 1: Installing GNOME Desktop
yum groupinstall "X Window System" "Desktop"
or
yum groupinstall "GNOME Desktop"
Step 2: Installing TightVNC Server
yum install -y tigervnc-server
Step 3: Create User
useradd vncuser
passwd vncuser
Step 4: Set VNC password for User
su - vncuser
vncpasswd
Note : This password is for accessing VNC remote desktop, and the password we created in step 3 is for accessing SSH.
Step 5: Create VNC Xstartup Script
/etc/init.d/vncserver start
## output is like - Starting VNC server: 1:vncuser
New 'vncuser.com:1 (vncuser)' desktop is vncuser.com:1
Starting applications specified in /home/vncuser/.vnc/xstartup
Log file is /home/vncuser/.vnc/vncuser.com:1.log
[ OK ] ##
Note : check whether xstartup script is created under (vncuser) user’s home directory
ls- l/home/vncuser/.vnc
## Output is like - -rw-------. 1 vncuser vncuser 8 Jul 15 12:27 passwd
-rwxr-xr-x. 1 vncuser vncuser 654 Oct 11 2012 xstartup ##
Step 6: Set Xstarup Resolution (edit the file like below)
vi /etc/sysconfig/vncservers
VNCSERVERS="1:vncuser"
VNCSERVERARGS[1]="-geometry 800x600"
To restart, status, stop the services
/etc/init.d/vncserver restart
/etc/init.d/vncserver status
/etc/init.d/vncserver stop
To check the status of running services
chkconfig
chkconfig vncserver on
Note : Chkconfig command is used to setup, view, or change services that are configured to start automatically during the system startup.