・VNC サーバーのインストール

[root@centos]# dnf -y install tigervnc-server


・パスワード設定

[root@centos]# vncpasswd
Password:********※パスワード入力
Verify:********※パスワード再入力
Would you like to enter a view-only password (y/n)? y※接続毎パスワード入力

Password:********※接続毎パスワード入力
Verify:********※接続毎パスワード再入力


・VNC サーバーの起動

[root@centos]# vncserver :1

上記で起動すると警告メッセージが表示されます
内容は

[今後のリリース時はユニットシステムに置き換えられ、削除される。
詳細については、/usr/share/doc/tigervnc/HOWTO.md をお読みください。]

との事

なので一旦 VNC サーバーを停止します

[root@centos]# vncserver -kill :1


・HOWTO.md に基づき config の設定

[root@centos]# vi ~/.vnc/config
## Supported server options to pass to vncserver upon invocation can be listed
## in this file. See the following manpages for more: vncserver(1) Xvnc(1).
## Several common ones are shown below. Uncomment and modify to your liking.
##
# securitytypes=vncauth,tlsvnc
# desktop=sandbox
# geometry=2000x1200
# localhost
# alwaysshared


最終行以下に追記

session=gnome ※使用するウィンドウシステム
securitytypes=vncauth,tlsvnc ※セキュリティタイプ
desktop=sandbox ※デスクトップタイプ
geometry=1024x768 ※表示解像度


・HOWTO.md に基づき vncserver.users の設定

[root@centos]# vi /etc/tigervnc/vncserver.users
# TigerVNC User assignment
#
# This file assigns users to specific VNC display numbers.
# The syntax is =. E.g.:
#
# :2=andrew
# :3=lisa


最終行以下に接続するユーザー分だけ記述

:1=******※ :1 = ディスプレイ番号 ****** = ユーザー名
:2=******※ :2 = ディスプレイ番号 ****** = ユーザー名