Guest User

Untitled

a guest
Jan 3rd, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. yum install tigervnc-server
  2. cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service
  3. vi /etc/systemd/system/vncserver@.service
  4.  
  5. [Unit]
  6. Description=Remote desktop service (VNC)
  7. After=syslog.target network.target
  8.  
  9. [Service]
  10. Type=forking
  11. User=<USER>
  12.  
  13. # Clean any existing files in /tmp/.X11-unix environment
  14. ExecStartPre=-/usr/bin/vncserver -kill %i
  15. ExecStart=/usr/bin/vncserver %i
  16. PIDFile=/home/<USER>/.vnc/%H%i.pid
  17. ExecStop=-/usr/bin/vncserver -kill %i
  18.  
  19. [Install]
  20. WantedBy=multi-user.target
  21.  
  22. [Unit]
  23. Description=Remote desktop service (VNC)
  24. After=syslog.target network.target
  25.  
  26. [Service]
  27. Type=forking
  28. User=<USER>
  29.  
  30. # Clean any existing files in /tmp/.X11-unix environment
  31. ExecStartPre=-/usr/bin/vncserver -kill %i
  32. ExecStart=/usr/bin/vncserver %i
  33. PIDFile=/home/<USER>/.vnc/%H%i.pid
  34. ExecStop=-/usr/bin/vncserver -kill %i
  35.  
  36. [Install]
  37. WantedBy=multi-user.target
  38.  
  39. systemctl daemon-reload
  40. su - root
  41. vncpasswd
  42. systemctl start vncserver@:1.service
  43.  
  44. Job for vncserver@:1.service failed because a timeout was exceeded. See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.
  45.  
  46.  
  47. [root@localhost ~]# systemctl status vncserver@:1.service
  48. ● vncserver@:1.service - Remote desktop service (VNC)
  49. Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
  50. Active: failed (Result: timeout) since Wed 2018-01-03 09:00:17 UTC; 22s ago
  51. Process: 2045 ExecStart=/usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  52. Process: 2040 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited, status=2)
  53.  
  54. Jan 03 08:58:50 localhost vncserver[2045]: New 'localhost:1 (root)' desktop is localhost:1
  55. Jan 03 08:58:50 localhost vncserver[2045]: Creating default startup script /root/.vnc/xstartup
  56. Jan 03 08:58:50 localhost vncserver[2045]: Creating default config /root/.vnc/config
  57. Jan 03 08:58:50 localhost vncserver[2045]: Starting applications specified in /root/.vnc/xstartup
  58. Jan 03 08:58:50 localhost vncserver[2045]: Log file is /root/.vnc/localhost:1.log
  59. Jan 03 08:58:50 localhost systemd[1]: PID file /home/root/.vnc/localhost:1.pid not readable (y...art.
  60. Jan 03 09:00:17 localhost systemd[1]: vncserver@:1.service start operation timed out. Terminating.
  61. Jan 03 09:00:17 localhost systemd[1]: Failed to start Remote desktop service (VNC).
  62. Jan 03 09:00:17 localhost systemd[1]: Unit vncserver@:1.service entered failed state.
  63. Jan 03 09:00:17 localhost systemd[1]: vncserver@:1.service failed.
  64. Hint: Some lines were ellipsized, use -l to show in full.
Add Comment
Please, Sign In to add comment