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
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
2.4 set the user's vnc password
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 |