Following the instructions from Redhat documentation (TigerVNC), I've installed VNCserver in RHEL 7. When I try to start the vncserver service, it returns an error

#systemctl start vncserver@:1.service
Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and 'journalctl -xn' for details.

I found the status of the vncserver as:

vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled)
   Active: failed (Result: exit-code) since Thu 2015-10-22 14:35:57 EDT; 13s ago
  Process: 6640 ExecStart=/sbin/runuser -l MyUser -c /usr/bin/vncserver %i -geometry 1280x1024 (code=exited, status=98)
  Process: 6637 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
systemd[1]: vncserver@:1.service: control process exited, code=exited status=98
systemd[1]: Failed to start Remote desktop service (VNC).
systemd[1]: Unit vncserver@:1.service entered failed state.

Updated the users in vncserver@.service file and have reloaded the daemon. Any ideas on how to resolve this.

  • did you run, as user, vncpasswd to set up a password? – meuh Oct 23 '15 at 8:35
  • @meuh Yes, I run as a user. – GIRI Oct 23 '15 at 14:33

Got lucky on this one (thanks to this).
Go to the folder "/tmp/.X11-unix/" and list content:

$ cd /tmp/.X11-unix/

$ ll

I found there several X0, X4, X5... files (one for each of my blocked user).
Each one is associated to a session, and should be deleted when the session is closed, BUT it is not always.

$ sudo rm X4

and VNC session should start:

$ systemctl restart vncserver@:4.service
  • 1
    Nope. Didn't help a bit – Alex Jolig Jun 19 '17 at 8:06

This worked for me on Centos7:

$ rm /tmp/.X11-unix/*
  • 1
    This doesn't seem very different from the other answer, except that it isn't as surgical as that one. – Eric Renouf Aug 26 '17 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.