Configure vncserver in CentOS7

Source: Internet
Author: User
1. run the following command as root to install TigerVNCserveryuminstalltigervnc-server

1. run the following command as root to install TigerVNC server

  Yum install tigervnc-server

You can also install the vnc client

  Yum install vnc

2. configure the VNC Server

2.1 create a new configuration file. here I open window 3, as follows:

  Cp/lib/systemd/system/vncserver @. service/lib/systemd/system/vncserver @: 3. service

2.2 edit/lib/systemd/system/vncserver @: 3. service and set zhongq parameters. the final content is as follows: (here, zhongq must be replaced with your account)

  [Unit] Description = Remote desktop service (VNC) after1_syslog.tar get network.tar get [Service] Type = forking # Clean any existing files in/tmp /. x11-unix environment ExecStartPre =/bin/sh-c '/usr/bin/vncserver-kill % I>/dev/null 2> & 1 |: 'execstart =/sbin/runuser-l zhongq-c "/usr/bin/vncserver % I-geometry 1024x768" PIDFile =/home/zhongq /. vnc/% H % I. pid ExecStop =/bin/sh-c '/usr/bin/vncserver-kill % I>/dev/null 2> & 1 |:' [Install] wantedby#multi user.tar get

2.3 update systemctl to make sure it takes effect

  Systemctl daemon-reload

2.4 set the user's vnc password

  Vncpasswd zhongq

2.5 start the service to enable vnc's window 3

  Systemctl start vncserver @: 3. service or vncserver: 3

Close Window 3

  Systemctl stop vncserver @: 3. service or vncserver-kill: 3

2.6 we can also set it to boot automatically

  Systemctl enable vncserver @: 3. service

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.