Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Related configuration of VNC SERVER under Linux system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report