Xvnc service configured via unit file fails with PID file error

Solution Verified - Updated -

Issue

  • With the latest systemd update, the VNC service fails to start when configured according to System Administrator's Guide > Chapter 13. TigerVNC. Getting following errors in the /var/log/messages:

    systemd[1]: Starting Remote desktop service (VNC)...
    systemd[1]: Can't open PID file /home/USERNAME/.vnc/HOSTNAME:1.pid (yet?) after start: No such file or directory
    systemd[1]: Failed to start Remote desktop service (VNC).
    systemd[1]: Unit vncserver@:1.service entered failed state.
    systemd[1]: vncserver@:1.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.
    
  • VNC users are not able to unlock the vnc session after the idle time has expired.
  • VNC Service fails with the error "systemd: New main PID XXXX does not belong to service, and PID file is not owned by root. Refusing." The VNC daemon is still active and can accept connections, however, it cannot be managed by systemd at this point.

Environment

  • Red Hat Enterprise Linux 7.7
    • tigervnc-server
    • systemd-219-67.el7_7.2 or later

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content