installation
yum install tigervnc-server
configuration
following configuration solution may solve the situation that the display is black with only vnc config cursor.
- for a single user
(1)as root, copy /usr/lib/systemd/system/vncserver@.service into /etc/systemd/system/, like
cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system
(2)edit /etc/systemed/system/vncserver@.service
vi /etc/systemd/system/vncserver@.service
, substituting USER with real user to login, modified lines resemble
ExecStart=/usr/sbin/runuser -l USER -c "/usr/bin/vncserver %i"
PIDFile=/home/USER/.vnc/%H%i.pid
after change, save&exit
(3)make changes take effect immediately
systemctl daemon-reload
(4)as a real vnc user, setup password of it
vncpasswd
verification
- start vnc server, here assumpting that display_number is :1
systemctl start vncserver@:1.service
systemctl enable vncserver@:1.service
#automatically start when system boot