1.centos7 vnc not start systemctl
- Given as follows: Failed to start Remote desktop service (VNC)
2. Solution
- Service Script Error name
- Normal service script name
- vncserver@:1.service
Note 1 in front of the colon: 1 as a whole is needed port parameters passed to the vncserver @: 1.service script, can not be purely digital
% I will be: 1 This port parameters replaced, so here is easily overlooked, resulting in service can not be used to start systemctl
- vncserver@:1.service
[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 appadmin -c "/usr/bin/vncserver %i -geometry 1280x1024"
ExecStart=/usr/sbin/runuser -l appadmin -c "/usr/bin/vncserver %i"
PIDFile=/home/appadmin/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
3. Reference Links
- https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-remote-access-for-the-gnome-desktop-on-centos-7