1. after installing the Red Hat Linux system, type the following command to check whether the vnc server has been installed in the system rpm-qvnc-server2. to configure vnc as a system service, add your user name to the following configuration file: vi/etc/sysconfig/vncserversVNCSERVERS = "1: root" 3. before starting the vnc service, let's use the vncpasswd command to create a vnc password 4. edit this
1. After installing the Red Hat Linux system, type the following command to check whether the vnc Server is installed in the system.
Rpm-q vnc-server
2. Configure vnc as a system service and add your user name to the following configuration file:
Vi/etc/sysconfig/vncservers
VNCSERVERS = "1: root"
3. Before starting the vnc service, let's use the vncpasswd command to create a vnc password.
4. Edit the script named xstartup.
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
Unset SESSION_MANAGER
Exec/etc/X11/xinit/xinitrc
[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
Xsetroot-solid gray
Vncconfig-iconic &
Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
Twm &
Restart vncserver.
5. When using the firewall to connect to a remote system, port 5901 must be enabled.
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5901-j ACCEPT
Restart the iptables service/sbin/service iptables restart. (Author: 2332909)