By default, the VNCServer package has been installed in CentOS5.3. you only need to select and start the package in the service list. By editing a file ~ HOME/. vnc/xstartup to start your window manager. Use startkde & to start KDE, and use gnome-session & to start GNOME. 1. start the VNCServer service: by default, the VNC Server software package has been installed in CentOS 5.3. you only need to select and start in the service list. By editing a file ~ HOME/. vnc/xstartup to start your window manager. Use startkde & to start KDE, and use gnome-session & to start GNOME.
1. start the VNC Server service: Use the vncserver command (generate the. vnc folder in the current user's home directory)
[Root @ CPAYNET005 ~] # Vncserver
You will require a password to access your tops.
Password: <输入密码>
Verify: <输入密码>
Xauth: creating new authority file/root/. Xauthority
Create for the first time ~ At HOME/. vnc/xstartup, the specified Window manager is twm, which is a very small Window manager and has twm on almost every X Window System machine. Twm does not have most of the fancy features of the "desktop manager" (like KDE, GNOME, or WindowMaker. The following is a modified example:
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
# Unset SESSION_MANAGER
# Exec/etc/X11/xinit/xinitrc
In the file, remove the second and third lines from the last, and add the first line to the last to start the GNOME desktop system. Of course, the last line can also be changed to startkde & mentioned in the first section of the article, indicating to start the KDE desktop system.
3. disable the VNC Server service
Vncserver-kill: desktop number
For example, close the above vnc connection
Vncserver-kill: 1
IV. advanced VNC Server settings
1. set the vncserver startup script (/etc/init. d/vncserver) to enable vncserver when the system starts automatically.
# Add the following lines to the/etc/rc. d/rc. local file
/Etc/init. d/vncserver start
# You can also run the chkconfig command to enable vncserver when the system is started.
[Root @ CPAYNET005 ~] # Chkconfig -- level 2345 vncserver on
Modify "1024x768" in ARGS to adapt to the actual X desktop parameter configuration. You can add any other VNC server parameter configuration here. In VNCSERVERS, modify root to the user you want to run the VNC desktop. 1 in VNCSERVERS indicates that VNC runs on desktop 1. if you want to add another desktop, you can modify the configuration as follows:
VNCSERVERS = "1: user1 2: user2 3: user3"
3. set the vnc server access password
Use the vncpasswd command
4. on the RedHat system, run the following command to start VNC:
/Etc/init. d/vncserver start
5. View VNC Server startup status
[Root @ CPAYNET005 ~] # Netstat-tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.