I've a Raspberry Pi 4 with Ubuntu 18.04 server. I often control it via VNC, so I create a systemd service to start vnc4server at boot, it worked well until yesterday, now the service doesn't start.
If I check with sudo systemctl status vnc4server@1
, I get:
[email protected] - Start VNC server at startup
Loaded: loaded (/etc/systemd/system/[email protected]; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-31 07:14:41 CEST; 11s ago
Process: 5103 ExecStart=/usr/bin/vnc4server -depth 24 -geometry 1280x720 :1 (code=exited, status=9
Process: 5098 ExecStartPre=/usr/bin/vnc4server -kill :1 > /dev/null 2>&1 (code=exited, status=2)
mar 31 07:14:40 bornonpiday systemd[1]: Starting Start VNC server at startup...
mar 31 07:14:40 bornonpiday systemd[5098]: pam_unix(login:session): session opened for user icolumbrmar 31 07:14:40 bornonpiday systemd[5103]: pam_unix(login:session): session opened for user icolumbrmar 31 07:14:41 bornonpiday systemd[1]: [email protected]: Control process exited, code=exited stmar 31 07:14:41 bornonpiday systemd[1]: [email protected]: Failed with result 'exit-code'.
mar 31 07:14:41 bornonpiday systemd[1]: Failed to start Start VNC server at startup.
This is my systemd service file:
[Unit]
Description=Start VNC server at startup
After=syslog.target network.target
[Service]
Type=forking
User=icolumbro
PAMName=login
PIDFile=/home/icolumbro/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vnc4server -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vnc4server -depth 24 -geometry 1280x720 :%i
ExecStop=/usr/bin/vnc4server -kill :%i
[Install]
WantedBy=multi-user.target
If I start the server manually, it works. What's wrong?
0 Answers