Centos 7 with GUI xfce+VNC
Posted: 2019 Dec 18, 13:15
System minimal requirements: 2GB RAM
1vCPU
Install epel release:
Install xfce group files:
Install tigerVNC server:
Run TigerVNC
Set TigerVNC password:
Stop TigerVNC temporary:
Create backup file for TigerVNC startup config:
Edit TigerVNC startup configuration:
Contents of TigerVNC startup configuration:
Run TigerVNC server again:
Use: ServerIP:1 on your VNC client software to connect
Autostart on reboot
1vCPU
Install epel release:
Code: Select all
yum -y install epel-release
Install xfce group files:
Code: Select all
yum groupinstall “Xfce” -y
Install tigerVNC server:
Code: Select all
yum -y install tigervnc-server tigervnc-server-minimal
Run TigerVNC
Code: Select all
vncserver
Set TigerVNC password:
Code: Select all
vncpasswd
Stop TigerVNC temporary:
Code: Select all
vncserver -kill :1
Create backup file for TigerVNC startup config:
Code: Select all
mv ~/.vnc/xstartup ~/.vnc/xstartup.bekup
Edit TigerVNC startup configuration:
Code: Select all
vi ~/.vnc/xstartup
Contents of TigerVNC startup configuration:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
Code: Select all
cp /etc/X11/Xresources ~/.Xresources
Code: Select all
chmod +x ~/.vnc/xstartup
Run TigerVNC server again:
Code: Select all
vncserver
Use: ServerIP:1 on your VNC client software to connect
Autostart on reboot
Code: Select all
cd /etc/systemd/system
Code: Select all
vi vncserver@.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=edward
PIDFile=/home/edward/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i
[Install]
WantedBy=multi-user.target
Code: Select all
systemctl daemon-reload
Code: Select all
systemctl start vncserver@1.service
Code: Select all
systemctl enable vncserver@1.service