../ |
---|
After updating to CentOS8.3, vncserver wasn't working with the traditional procedure. When I run vncserver, I just get the following message: Please read HOWTO.md.
$ vncserver :1
vncserver has been replaced by a systemd unit.
Please read /usr/share/doc/tigervnc/HOWTO.md for more information.
Apparently/usr/bin/vncserver is obsolete. The procedure for the new setup is as follows. Eliminates the hassle of manually editing service definitions and killing pre-existing processes.
First, as root, do the following only once.
$ su -
$ echo "session=gnome" >> /etc/tigervnc/vncserver-config-defaults
$ restorecon /usr/sbin/vncsession /usr/libexec/vncsession-start
$ cp -p /usr/lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:1.service
The user and display number to use are described in the following file. In the example below, the user taconana
has a display number of 1
.
$ vi /etc/tigervnc/vncserver.users
:1=taconana
Edit the config file for each user. Then set a password.
$ su - taconana
$ restorecon -RFv /home/taconana/.vnc
$ vi /home/taconana/.vnc/config
# session=gnome # vncserver-config-Not required if set to defaults
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
geometry=1360x768 #This is optional
# localhost
# alwaysshared
$ vncpasswd #Password setting
Password: ***
Verify: ***
Would you like to enter a view-only password (y/n)? n
A view-only password is not used
Go back to root and start the service.
$ systemctl daemon-reload
$ systemctl start vncserver@:1
$ systemctl status vncserver@:1
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-12-13 12:27:52 JST; 27min ago
Process: 133876 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 133882 (vncsession)
Tasks: 1 (limit: 24986)
Memory: 2.0M
CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
? 133882 /usr/sbin/vncsession taconana :1
$ systemctl enable vncserver@:1 #Make it auto-executable.
that's all
../ |
---|
Recommended Posts