Remote Desktop of VNC under the same LAN in Centos

Source: Internet
Author: User

Remote Desktop of VNC under the same LAN in Centos
I. VNC software

For example, Centos is controlled by Windows:
Install VNC on Centos

// Check whether installation # rpm-q tigervnc-server // installation # yum install tigervnc-server // create a user (this step is to create a user for the system, you can use an existing account, but you must switch to the corresponding account to change the vnc password) # useradd user1 # passwd user1 // switch to and modify the User Password # su-user1 $ vncpasswd $ exit // edit the VNC configuration file vi/etc/sysconfig/vncserversVNCSERVERS = "1: user1 "VNCSERVERARGS [1] ="-geometry 800x600 "// start the service (the default listening port is 5900 + desktop number (, 3 )) service vncserver start // accessed through VNCviewer (centos) # vncviewer 192.168.1.11: 1

Other commands:

Restart vnc: service vncserver restart disable vnc: service vncserver stop with system start: chkconfig vncserver on disable a desktop number: vncserver-kill: 1 (there is a space before the colon) Change Password: vncpasswd (switch to the user) Start a desktop number: vncserver: 1 (there is a space before the colon)

Install the VNCviewer software in Windows and use the ip address and serial number to access:

Ii. Problems

1. Incorrect configuration file:

#service vncserver startStarting VNC server: no displays configured

Modify: Remove comments from vi/etc/sysconfig/vncservers and modify the comments according to the account information.

VNCSERVERS="1:user1"VNCSERVERARGS[1]="-geometry 800x600"

2. Incorrect Font:

starting vnc server :WARNING: the first attempt to star Xvnc failed,possibly because the font catalog is not properly configured, attempting to determine an appropriate font path for this system and restart Xvnc using that font path

Modify: Update Font Library

yum install pixman pixman-devel libXfont

3. The password is not changed to the corresponding account.

Getpassword error: Inappropriate ioctl for devicePassword: [failed]

Modify:

// Switch to and modify the User Password # su-user1 $ vncpasswd $ exit

4. connection failure:Centos may have enabled the firewall. Solution: iptables Firewall:

Vim/etc/sysconfig/iptables plus:-a input-m state -- state NEW-m tcp-p tcp -- dport 5900: 5903-j ACCEP restart: service iptables restart or disable firewall: service iptables stop

Centos7 default Firewall:

firewall-cmd --permanent --add-service vnc-serversystemctl restart firewalld.service

Not in the same LAN: centos uses ifconfig to view the network status, while windows uses ipconfig to view the network status. You must use the same default gateway with the same mask. The ip address may last differently. At the same time, ping is not available.

5. When the VNCviewer client is connected, the system prompts that the connection has been rejected. was refused: In this step, it indicates that all the connections have been passed. I encountered a problem here and changed the configuration file to the following solution:

VNCSERVERARGS[1]="-geometry 800x600"

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.