CentOS 6.7 Installation and configuration Vncserver

Source: Internet
Author: User

VNC is a wide range of server management software, you can achieve graphical management, the following is a brief introduction to how to install VNC under centos6.7.

Installing Vncserver
Yum Install Tigervnc tigervnc-server-y

Configure Vncserver

VI  /etc/sysconfig/vncserver

Remove the following two lines of # in the file

# vncservers="2:myusername"# vncserverargs[2]="- Geometry 800x600-nolisten tcp-localhost"

and modify the user name and monitor resolution according to your needs:

vncservers="2:root"vncserverargs[2]="- Geometry 1024x768  -nolisten tcp-localhost"

  To set the VNC access password:

vncpasswd

Note: This is a password for the root remote user above, so it is available under the root account, and so on, for other accounts with the password, it is necessary to use the command under another account .

  

Set Iptables:

Iptables firewall will block VNC Remote Desktop by default, so it needs to be allowed in iptables. When you start the VNC service, you can use the NETSTAT–TUNLP command to view the port used by the VNC service, you can find 5801,5901,6001 and so on. Use the following command to turn on these ports:

Vim/etc/sysconfig/iptables

Add to:

5801 -J Accept5901 -J Accept6001 -j Accept

To restart the firewall:

/etc/init.d/iptables restart

Or shut down the firewall directly:

/etc/init.d/iptables stop

Problems you may encounter:

A, black screen
Installed in Linux in the configuration of the VNC server, the discovery of multi-user login will appear black screen situation, the specific phenomenon is:
The client can enter the system via IP to the session number, but landing in is dark, except for a forked mouse, pitch.

Cause: The user's VNC startup file permissions are not set correctly.
Workaround: Modify the properties of the black screen user's Xstartup (typically:/user directory/.vnc/xstartup) file to 755 (rwxr-xr-x).
After that, kill all the VNC clients that have started:
Vncserver-kill:1
Vncserver-kill:2 (Note:-kill with: 1 or: 2 with a space in the middle)
Finally restart the Vncserver service! #/etc/init.d/vncserver Restart

Note: Vncserver can only be turned off by the user who initiated it, and instant root cannot turn off the vncserver that other users have opened.
Kill the process unless you use kill to order the violence.

Reference Link: http://www.ha97.com/4634.html

CentOS 6.7 Installation and configuration Vncserver

Related Article

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.