Related configuration of VNC server under Linux system

Source: Internet
Author: User


The code is as follows:

Yum Install Tigervnc-server


(1) Copy the configuration file:

The code is as follows:

~]# CP /lib/systemd/system/vncserver@.service


(2) Edit configuration file:


Execstart=/sbin/runuser-l user-c "/usr/bin/vncserver%i-geometry 1280x1024


Replaces user with the VNC service to use, such as root:

Code as follows:

EXECSTART=/SBIN/R Unuser-l root-c "/usr/bin/vncserver%i"

If you want to modify the resolution, you can modify the geometry content, and others do not need to be modified.

And then keep the configuration.

(3) uses the SYSTEMCTL command to force a re-read of the configuration file: The

Code is as follows:

~]# systemctl daemon-reload

(4) Configure Vncserver password

The p> code is as follows:


(5) If two users want to use VNC at the same time, you need to configure two profiles:

Vncserver-user_1@.service and Vncserver-user_ 2@.service, the file content is configured with the root user

And then the VNC password is created for two users: the

Code is as follows:

~]$ su-user_1

~]$ vncpasswd



~]$ su-user_2

~]$ vncpasswd



(6) Start VNC service

Code as follows:

Systemctl start vncserver@:10

To boot, use the following command:

Code as follows:

SYSTEMCT L Enable vncserver@:10

Ln-s '/etc/syStemd/system/vncserver@.service '

'/etc/systemd/system/ '

(7) Close process

Code as follows:

Systemctl disable vncserver@:d isplay_number.service

Systemctl stop Vncserve r@:d Isplay_number.service

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.