yum install tigervnc-server
useradd vic passwd vic #change password
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
edit the config file
vim /etc/systemd/system/vncserver@:1.service
content of the config file should be
[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 vic -c "/usr/bin/vncserver %i" PIDFile=/home/vic/.vnc/%H%i.pid ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
firewall-cmd --permanent --zone=public --add-service vnc-server firewall-cmd --reload
su - srijan
vncserver
su - systemctl daemon-reload systemctl enable vncserver@:1.service reboot systemctl start vncserver@:1.service