Related configuration of VNC server under Linux system

Source: Internet
Author: User

Installation:

The code is as follows:

Yum Install Tigervnc-server

Configuration:

(1) Copy the configuration file:

The code is as follows:

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

  /etc/systemd/system/vncserver@.service[/code]

(2) Edit configuration file:

[code]

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

Pidfile=/home/user/.vnc/%h%i.pid

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:

vncpasswd

(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

Password:

Verify:

~]$ su-user_2

~]$ vncpasswd

Password:

Verify:

(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/multi-user.target.wants/vncserver@:10.service '

(7) Close process

Code as follows:

Systemctl disable vncserver@:d isplay_number.service

Systemctl stop Vncserve r@:d Isplay_number.service

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.