Remote connection to Linux desktop in VNCViewerWindows

Source: Internet
Author: User

Remote connection to Linux desktop in VNCViewerWindows

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 !)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.