VNCViewer remote connection to Linux desktop in Windows, vncviewerlinux
Recently, the project needs to be deployed on the centos6.5 server, but with various errors, I want to debug the code in linux. However, we used to connect to the remote server through ssh. In ssh, we certainly cannot open eclipse and other integrated development tools. Therefore, we need to install desktop and vncserver on the remote server, then, use vncViewer in windows to connect.
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
[root@centos6 ~]# rpm -qa | grep vnctigervnc-1.0.90-0.17.20110314svn4359.el6.i686gtk-vnc-0.3.10-3.el6.i686tigervnc-server-1.0.90-0.17.20110314svn4359.el6.i686gtk-vnc-python-0.3.10-3.el6.i686
<Span style = "font-family: Arial, Helvetica, sans-serif; background-color: rgb (255,255,255);"> If the above rpm packages already exist, this indicates that the VNC server has been installed. You can go to step 3 to start the vncserver. Otherwise, perform Step 2. </span>
(2) install vncServer
# yum install tigervnc# yum install tigervnc-server
(3) Start vncserver
The first time you start vncserver, you need to enter the password twice.
[root@centos6 mnt]# vncserverYou will require a password to access your desktops.Password:Verify:New 'centos6.xman.org:1 (root)' desktop is centos6.xman.org:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /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.
[root@centos6u2 ~]# vim /etc/sysconfig/iptables# then add below line to this file-A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5910 -j ACCEPT# restart iptables[root@centos6u2 ~]# service iptables restart
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: installing and configuring VNC in http://www.cnblogs.com/wise-man/archive/2012/07/23/2604023.html CentOS 6
2: http://www.ha97.com/4634.html#comment-322709 CentOS Linux VNC Server Remote Desktop configuration details
3: http://blog.sina.com.cn/s/blog_6e0c0fdf010198pl.html TightVNC Windows Remote connection Linux Desktop
Author: small village chief source: http://blog.csdn.net/lu597203933 welcome to reprint or share, but please be sure to declare the source of the article. (Sina Weibo: small village chief zack. Thank you !)
In windows, how does one remotely connect to the linux system desktop through vnc?
1. Installation graphical interface:
1) install the logon MANAGER: $ sudo apt-get install TPD
2) install the desktop environment and install only the most basic components: $ sudo apt-get install gnome-core (after installation, you can use the startx command to start the GUI)
3) install the graphic interface (automatically install the application): $ sudo apt-get install ubuntu-desktop (restart the system after installation)
2. Install vnc server (VNC server) in ubuntu ):
$ Sudo apt-get install vnc4server
3 Start the VNC service: $ vncserver: 1 (Number 1 indicates the desktop number)
Run the following command to connect to the ubuntu server at the same time: $ vncserver-geometry 1280 × 800-alwaysshared: 1 (-geometry 1280 × 800 indicates the resolution, -alwaysshared indicates that multiple users can connect to the same desktop at the same time)
Stop the VNC service: $ vncserver-kill: 1
4. In the ubuntuc server graphical interface, set the allowed end-range Logon:
System> Preferences> Remote Desktop:
After setting the password, you can remotely connect to ubuntu server through vnc viewer on the windows client!
Ladies and gentlemen, can I use vncviewer in Linux to connect to vncserver in windows? If yes, how to connect?
Yes, but if you want to install vncviewer in linux, other IP addresses are the same as those in windows.