Hello fellow coders,
I need help, I'm getting this error.

vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled)
   Active: Failed (Result: resources) since Mon 2015-01-19 23:46:19 CET; 1min 57s ago
  Process: 557 ExecStart=/sbin/runuser -l root -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 553 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

Jan 19 23:46:19 systemd[1]: PID file /home/root/.vnc/vps452....
Jan 19 23:46:19 systemd[1]: Failed to start Remote desktop ....
Jan 19 23:46:19 systemd[1]: Unit vncserver@:1.service enter....
Hint: Some lines were ellipsized, use -l to show in full.

Every time I'm using this command to turn on TightVNC server/desktop...

systemctl start vncserver@:1.service

So what do i do? Please help fast! :)

Dani AI

Generated

A short, practical diagnostic checklist that follows ’s request for system info and ties back to ’s service trace. Systemd failing the VNC template is most often a configuration/permissions mismatch: the unit expects a PID file in the user's .vnc directory (or a specific name), the service is running under the wrong account, SELinux is blocking writes, or an existing Xvnc process already owns the display. Running the server as root is uncommon and can hide permission/SELinux problems — prefer running VNC under the intended non‑root user.

Gather focused evidence first. The commands below show full unit status, journal entries and the on‑disk unit file, and let you inspect the .vnc directory and running Xvnc processes:

systemctl status vncserver@:1.service -l --no-pager
journalctl -u vncserver@:1.service -b --no-pager
systemctl cat vncserver@:1.service
ls -la /home/<username>/.vnc
ps aux | egrep 'Xvnc|X.*:1'

Key things to check in the outputs: the unit’s PIDFile setting matches the actual pid filename created by VNC, the unit runs as the intended user (or add User= instead of calling runuser), and the .vnc directory and its files are owned by that user. If editing the unit, reload systemd afterwards.

A minimal service fragment that usually works (replace vncuser with the real username) is:

[Service]
Type=forking
User=vncuser
PIDFile=/home/vncuser/.vnc/%H:%i.pid
ExecStart=/usr/bin/vncserver %i
ExecStop=/usr/bin/vncserver -kill %i

On CentOS, SELinux often intervenes; look for AVC denials in the audit log if writing to /home fails, or test briefly with permissive mode to confirm. If the journal still shows failure after the above checks, capture the full unit file and the journal output (no ellipses) for deeper analysis.

Recommended Answers

All 2 Replies

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Active: Failed (Result: resources) since Mon 2015-01-19 23:46:19 CET; 1min 57s ago
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Jan 19 23:46:19 systemd[1]: Failed to start Remote desktop ....
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Since this is coming from systemd, I have to assume you are using a new/bleading-edge distribution? Please provide more system information.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.