Ii. Problems1. 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"