Home » Uncategorized » VNC Installation on CentOS/RHEL

VNC Installation on CentOS/RHEL

INSTALL
1 yum -y install tigervnc tigervnc-server

 CONFIGURE:

cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

vim /etc/systemd/system/vncserver@:1.service

edit /etc/systemd/system/vncserver@:1.service with the username

# vim /etc/systemd/system/vncserver@:2.service

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[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=/usr/sbin/runuser -l <USERNAME>-c "/usr/bin/vncserver %i" PIDFile=/home/<USERNAME>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target

MAKE IT GO
systemctl daemon-reload systemctl enable vncserver@:1.service systemctl start vncserver@:1.service

GIVE USER A VNCPASSWORD

su - <USERNAME>
vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n

https://www.golinuxcloud.com/step-by-step-guide-to-configure-tigervnc/

INSTALLDESKTOP / XFCE
yum install epel-release -y
yum groupinstall "Server with GUI" -y
yum groupinstall "Xfce" -y
systemctl set-default graphical

reboot

Leave a Reply