Centos/linux installation Vncserver

Source: Internet
Author: User

VNC is the full name of Virtual Network Computing, which belongs to the remote control class software. The advantage is that it supports remote graphical control across operating systems. In daily work, the server is often the existence of the computer room, it is impossible to run to the computer room every time the graphical interface operation, so VNC is a good alternative software.

1, check whether the machine has been installed Vncserver
# Rpm-qa|grep Tigervnc

2, Installation Vncserver
# yum-y Install Tigervnc-server

3. Start and set Vncserver password
The first time you start Vncserver will prompt for a password, then you will need to use the VNCPASSWD command
# Vncserver
Password:
Verify:

4. Modify the/root/.vnc/xstartup file
Because of the CentOS system we use here, the GNOME desktop is installed
# sed-i ' s/twm &/gnome-session &/'/root/.vnc/xstartup

5. Modify the/etc/sysconfig/vncservers file
In this file, you can set up the users who want to run the VNC desktop, and the screen resolution displayed when you connect using Vncview. The 1 in vncservers indicates that VNC is running on Desktop 1, and if you want to add additional desktops, you can modify the configuration
# echo-e ' vncservers= "1:root"
vncserverargs[1]= "-geometry 1024x768"
' >>/etc/sysconfig/vncservers

6. Set to boot
# chkconfig--add Vncserver
# Chkconfig Vncserver on

7. Restart Vncserver
# Service Vncserver Restart

8, firewall port open
#/sbin/iptables-i input-p TCP--dport 5901-j ACCEPT
#/etc/rc.d/init.d/iptables Save

9. Check the boot status
# NETSTAT-TULNP

Note: If you access VNC via a VNC client, the port is 5901

10. Other:
10.1: Modify VNC Password
# VNCPASSWD

10.2: Stop VNC server:
Vncserver-kill: Desktop number
For example
# vncserver-kill:1
Note: Vncserver can only be turned off by the user who initiated it, and instant root cannot be turned off by other users unless the process is killed with the kill command.

10.3: Set the same display port to connect multiple clients

# vncserver-alwaysshared

Centos/linux installation 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.