VNCViewer remote connection to Linux desktop in Windows
I. Server (Centos6.5)
1: Install the desktop:
# Yum groupinstall "GNOME Desktop Environment" (CentOS 5.x install GNOME Desktop Environment)
# Yum groupinstall "X Window System" "Desktop" (CentOS 6.x install GNOME Desktop Environment)
2: Install vncserver
(1) Check whether VNCServer is installed
[Java] view plaincopyprint?
- [Root @ centos6 ~] # Rpm-qa | grepvnc
- Tigervnc-1.0.90-0.17.20110314svn4359.el6.i686
- Gtk-vnc-0.3.10-3.el6.i686
- Tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686
- Gtk-vnc-python-0.3.10-3.el6.i686
[Java] view plaincopyprint?
- <Spanstyle = "font-family: Arial, Helvetica, sans-serif; background-color: rgb (255,255,255);"> If the above rpm packages already exist, it indicates that the VNCserver has been installed. You can jump to Step 3 to start the vncserver. Otherwise, perform Step 2. </span>
(2) install vncServer
[Java] view plaincopyprint?
- # Yuminstalltigervnc
- # Yuminstalltigervnc-server
(3) Start vncserver
The first time you start vncserver, you need to enter the password twice.
[Java] view plaincopyprint?
- [Root @ centos6mnt] # vncserver
- Youwillrequireapasswordtoaccessyourdesktops.
- Password:
- Verify:
- New 'centos6 .xman.org: 1 (root) 'comment topiscentos6 .xman.org: 1
- Creatingdefastartstartupscript/root/. vnc/xstartup
- Startingapplicationsspecifiedin/root/. vnc/xstartup
- Logfileis/root/. vnc/centos6.xman.org: 1.log
Note:
#/Etc/init. d/vncserver restart
Note: Sometimes an error is reported when the preceding command is started. You can run the command directly:
# Vncserver
Note: Disable the vncserver command: vncserver-kill: 1 vncserver-kill: 2
(4) configure remote logon to gnome Desktop:
# Vim/etc/sysconfig/vncservers (this file is not required for SUSE Enterprise Edition)
Add the following two lines at the end:
VNCSERVERS = "1: root"
VNCSERVERARGS [1] = "-geometry 1024x768-alwaysshared-depth 24"
Note: If a black screen appears during windows connection (when the IP address and port are not output incorrectly), you can change the resolution here to 800x600.
(5) firewall settings
If you do not set a firewall connection, it may be blocked. you can disable the firewall or add the VNC server port number to the firewall's Trust List:
Disable firewall: service iptables stop
Or: add the VNC server to the firewall Trust List of linux.
[Java] view plaincopyprint?
- [Root @ centos6u2 ~] # Vim/etc/sysconfig/iptables
- # Thenaddbelowlinetothisfile
- -AINPUT-mstate -- stateNEW-mtcp-ptcp -- dport5900: 5910-jACCEPT
- # Restartiptables
- [Root @ centos6u2 ~] # Serviceiptablesrestart
Other Firewall actions visible: http://blog.csdn.net/jemlee2002/article/details/7042991
Ii. Client (windows)
Next, you can download http://vnc-pe.softonic.cn/vncviewerto install it. Open the input IP address and port number. I have not figured out the port number here. I entered 1 here. You can try 2, 5901, or 5902. If you have not studied it, please let me know.
References: 1: http://www.cnblogs.com/wise-man/archive/2012/07/23/2604023.htmlCentOS 6 install and configure VNC
2: http://www.ha97.com/4634.html#comment-322709 CentOSLinux VNC Server Remote Desktop configuration details
3: http://blog.sina.com.cn/s/blog_6e0c0fdf010198pl.html TightVNC Windows Remote connection Linux Desktop