0

I can not get vncserver to start after following How To Install and Configure VNC Remote Access for the GNOME Desktop on CentOS 7.

I get to sudo systemctl restart vncserver@:4.service and receive the following error:

 Job for vncserver@:1.service failed because the control process exited
 with error code. See "systemctl  status vncserver@:1.service" and
 "journalctl  -xe" for details.

$ sudo systemctl status vncserver@:1.service:**

 ● vncserver@:1.service - Remote desktop service (VNC)    Loaded:
 loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor
 preset: disabled)    Active: failed (Result: exit-code) since Sat
 2018-06-09 05:37:57 HST; 2min 0s ago   Process: 4270
 ExecStart=/usr/sbin/runuser -l john -c /usr/bin/vncserver :1
 (code=exited, status=98)   Process: 4268 ExecStartPre=/bin/sh -c
 /usr/bin/vncserver -kill :1  /dev/null 2&1 || : (code=exited,
 status=0/SUCCESS)

 Jun 09 05:37:56 localhost.localdomain systemd[1]: Starting Remote
 desktop service (VNC)... Jun 09 05:37:57 localhost.localdomain
 systemd[1]: vncserver@:1.service: Control process exited, code=exited
 status=98 Jun 09 05:37:57 localhost.localdomain systemd[1]: Failed to
 start Remote desktop service (VNC). Jun 09 05:37:57
 localhost.localdomain systemd[1]: vncserver@:1.service: Unit entered
 failed state. Jun 09 05:37:57 localhost.localdomain systemd[1]:
 vncserver@:1.service: Failed with result 'exit-code'.

What does exit code=98 mean?

Things I've Tried

Remove /tmp lock files

sudo rm -rfv /tmp/.X11-unix
sudo rm .X0-lock .X1-lock

Edit 1: I tried the same steps on Centos 7 and it worked fine. I wonder if this has to do with SE Linux on Fedora? Any suggestions?

Edit 2: After further research, this appears to be a SE Linux issue and reported bug: Job for vncserver@:1.service failed because the service did not take the steps required by its unit configuration.. I have tried the suggested resolutions without success.

  • I have a sneaky suspicion that the 98 doesn't mean anything in particular. It appears in a lot of "can't start vncserver" questions but nobody explains the value (and the causes are different.) – Jeff Learman Jun 11 '18 at 20:50
  • @JeffLearman What "causes" are you referring to? This might help me pinpoint what is going on. – Amstell Jun 12 '18 at 14:00
  • 1
    I googled "vncserver exit status 98" and saw a number of articles, with different solutions and situations. I didn't look deep, so maybe there was a common underlying cause, but original causes (situations) were different. One possibility is server name incorrect. Try starting vncserver without the name (just run vncserver &). Use "ps" to see what vnc sessions are running, because you can't start one that's already running. Also a possible issue about running it as root since /home/root doesn't exist but you're running it as john. (Make sure /home/john exists.) – Jeff Learman Jun 12 '18 at 17:46

Your Answer

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

Browse other questions tagged or ask your own question.