Install VNC Server on CentOS 7
Oct 29, 2020 | 3320 views
VNC with Default desktop [Recommended]
Refer to:
## install vncserver
yum install tigervnc-server xorg-x11-fonts-Type1
## copy vnc systemc config file, :3 is an example, other number can be used
cp /lib/systemd/system/[email protected] /etc/systemd/system/vncserver@:3.service
## replace with a user name
grep USER /lib/systemd/system/[email protected]
# 2. Replace with the actual user name and edit vncserver
ExecStart=/usr/bin/vncserver_wrapper %i
## change into
# su -
## run below command to set user's vnc password
$ vncserver
VNC with XFCE
Refer to
Beware xstartup file requires to unset variables SESSION_MANAGER and DBUS_SESSION_BUS_ADDRESS as below describles.
--------- Install necessary packages in root ------
881 yum -y install epel-release
883 yum groupinstall "Xfce" -y
884 yum -y install tigervnc-server tigervnc-server-minimal
885 history
--------- login to normal user ------------
# su - user
1 ls
## set password
2 vncserver
3 cd ~/.vnc/
4 vncserver -list
cp /etc/X11/Xresources ~/.Xresources
5 cp xstartup{,.bak}
## EDIT xstartup as below
7 cat xstartup
#!/bin/bash
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
xrdb $HOME/.Xresources
startxfce4 &
For Ubuntu 16.04: How to Install and Configure VNC on Ubuntu 16.04
For Ubuntu 18.04: How to Install and Configure VNC on Ubuntu 18.04