Get the App
SLTechnology News&Howtos  ›  Servers  › 

Related configuration of VNC SERVER under Linux system

Shulou Source: shulou.com Published: 2022-06-01 11:59:19 10月05日 Update

This article introduces the relevant knowledge of "VNC SERVER-related configuration under Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

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 the configuration file:

[code]

ExecStart=/sbin/runuser-l USER-c "/ usr/bin/vncserver% I-geometry 1280x1024"

PIDFile=/home/USER/.vnc/%H%i.pid

Replace USER with the user of the VNC service you want to use, such as root:

The code is as follows:

ExecStart=/sbin/runuser-l root-c "/ usr/bin/vncserver% I"

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

Then keep the configuration.

(3) use the systemctl command to force rereading the configuration file:

The code is as follows:

~] # systemctl daemon-reload

(4) configure vncserver password

The 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 content of the file is the same as the configuration method of root users

Then create an vnc password for the two users:

The code is as follows:

~] $su-USER_1

~] $vncpasswd

Password:

Verify:

~] $su-USER_2

~] $vncpasswd

Password:

Verify:

(6) start the vnc service

The code is as follows:

Systemctl start vncserver@:10

To boot, use the following command:

The code is as follows:

Systemctl enable vncserver@:10

Ln-s'/ etc/systemd/system/vncserver@.service'\

'/ etc/systemd/system/multi-user.target.wants/vncserver@:10.service'

(7) shut down the process

The code is as follows:

Systemctl disable vncserver@:display_number.service

Systemctl stop vncserver@:display_number.service

This is the end of the content of "VNC SERVER-related configuration under Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Configuration code file content user system two command password more knowledge service practical successful learning next resolution at the same time dilemma actual situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft NVidia MariaDB Xiaomi