Posted On April 1, 2019

Installing VNC on Centos 5.3

kimconnect 0 comments
blog.KimConnect.com >> Linux >> Installing VNC on Centos 5.3
Install VNC server package upon server setup, then run in include GNOME desktop environment:
# yum -y groupinstall “GNOME Desktop Environment”
# yum remove esc
remove smart card module (not needed)
Add a user(s)
# vi /etc/sysconfig/vncservers
—
VNCSERVERS=”0:root”
VNCSERVERARGS[0]=”-geometry 1024×768 -depth 16″
—
In this case we need to use port 5900+0 so port 5900.
Setting a password
# vncpasswd
Password: P4ss—
Verify: P4ss—
# service vncserver start
# chkconfig vncserver on //set VNCserver to start at bootup
Open firewall ports to allow VNC services:
# vi /etc/sysconfig/iptables
# Open VNC for USER1
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5800 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5900 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 6000 -j ACCEPT
# Open VNC for USER2
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5801 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 6001 -j ACCEPT
# service iptables restart
How to reconnect to VNC
# ps -ef | grep vnc
—
Look for process ID next to the username, then
# kill [process ID]
—
# vncserver :1
Connect at port 5901
——————————–
I find a method could reuse the lowest number via “vncserver”
cd /tmp
ll -al you will find some files like these: .X0-lock …. .X7-lock
rm -r .X*
vncserver
reuse :1 not :8
——————-
To disable gnome-panel and background
# killall gnome-panel
To enable gnome-panel
# service start gnome-panel

Leave a Reply

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

Related Post

OpenLDAP Migration

LDAP PKGSRC Cutover # Compress ldap directory on WEB01.PROD tar -C /home/webadmin/pkg/var/openldap -czvf /tmp/kimconnect-com.gz kimconnect-com…

How to Flash Bios Using CentOS live USB

Start CentOS live USB copy T5500A16.bin to desktop Run terminal su init 1 cd /home/centoslive/Desktop…

Linux: More Basic Commands

Networking Ping 1 Time ping google.com -c 1 #c is abbreviation for count Check Networking…
Other project: DragonCoin.com