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

Ubuntu 20.04: Setting Static IP Address on an Interface

Short Version # Configure networking sudo vim /etc/netplan/*.yaml ### Sample content ### network: version: 2…

How To Install Remote Desktop on Ubuntu or Centos 7

Ubuntu:sudo apt-get updatesudo apt-get install xrdp xfce4echo xfce4-session >~/.xsessionsudo service xrdp restartCentOS 7:su -vim /etc/yum.repos.d/xrdp.repo-----…

How to Install Virtualbox in Ubuntu

Simply run these two commands: sudo add-apt-repository multiverse && sudo apt-get update sudo apt -y…
Other project: DragonCoin.com