How To Fix Error Job For [email protected]:1.service Failed Because The Control Process Exited With Error Code. See “systemctl Status [email protected]:1.service” And “journalctl -xe” For Details When Start VNC Server.

After install VNC server on CentOS, when i run command # systemctl start [email protected]:1.service to start it, i meet bellow error message.

# systemctl start [email protected]:1.service
Job for [email protected]:1.service failed because the control process exited with error code. See "systemctl status [email protected]:1.service" and "journalctl -xe" for details.

I search google for the resolution, finally i find below steps.

  1. First login to linux OS with the user which you use in /etc/systemd/system/[email protected]:1.service file.
  2. Verify file /usr/bin/vncserver exist and execute it in the terminal.
    [[email protected]srv ~]$ /usr/bin/vncserver 
    You will require a password to access your desktops.
    Would you like to enter a view-only password (y/n)? y
    xauth:  file /home/happyzhaosong/.Xauthority does not exist
    New 'MiWiFi-R4A-srv:3 (happyzhaosong)' desktop is MiWiFi-R4A-srv:3
    Creating default startup script /home/happyzhaosong/.vnc/xstartup
    Creating default config /home/happyzhaosong/.vnc/config
    Starting applications specified in /home/happyzhaosong/.vnc/xstartup
    Log file is /home/happyzhaosong/.vnc/MiWiFi-R4A-srv:3.log
  3. Then it will create /home/happyzhaosong/.vnc/xstartup file.
  4. Edit file /home/happyzhaosong/.vnc/xstartup, add # at the beginning of line vncserver -kill $DISPLAY to remove it.
    if [ -e /usr/bin/gnome-session -o -e /usr/bin/startkde ]; then
       # vncserver -kill $DISPLAY
  5. If above method do not take effect, you can run command # rm -rf /tmp/.X11-unix/ with root user, and then reboot system.
    # rm -rf /tmp/.X11-unix/
  6. If above method do not take effect, you can edit file /etc/systemd/system/vncserver@:1.service and change Service —> Type from forking to simple.
    # vim /etc/systemd/system/[email protected]:1.service
    # Edit Service section, change Type=forking to Type=simple. 
  7. Then run command # systemctl daemon-reload to update systemctl.

    # systemctl daemon-reload
0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest Most Voted
Inline Feedbacks
View all comments
Chan Kim
Chan Kim

Oh Thank you so much.
In my case it was the fork->simple thing.

Would love your thoughts, please comment.x