I add text "-display :2" to line
Code: Select all
ExecStart=/usr/bin/x11vnc -norc -forever -shared -bg -display :2 -autoport 5900 -o /var/log/x11vnc.log
I decided run command x11vnc locally on server and then try connect from client. it works! Unfortunetly only once. When I close session and try make connection agian the same problem exist.
------------------------------------------------
Yesterday everthing worked fine but I did software updates today and right now x11vnc.service failed
My prvious configuration when it works correctly:
Code: Select all
"/etc/ssh/sshd_config file
PasswordAuthentication no
Code: Select all
# ssh-keygen
etc
Code: Select all
# yum install x11vnc-0.9.13-1.el7.rf.x86_64.rpm
Code: Select all
/etc/systemd/system/x11vnc.service:
[Unit]
Description=VNC Server for X11
Requires=display-manager.service
After=display-manager.service
[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -norc -forever -shared -bg -autoport 5900 -o /var/log/x11vnc.log
ExecStop=/usr/bin/killall x11vnc
[Install]
WantedBy=graphical.target
Unfortunetly software updates package contain new VNC server: x11vnc-0.9.13-11.el7. I decided remove it and again install x11vnc-0.9.13-1.el7.rf.x86_64.rpm
above step didn't solve my problem.
Existing situation:
#sudo systemctl status x11vnc.service ,
Code: Select all
● x11vnc.service - VNC Server for X11
Loaded: loaded (/etc/systemd/system/x11vnc.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2018-11-04 19:29:59 CET; 8s ago
Process: 17240 ExecStart=/usr/bin/x11vnc -norc -forever -shared -bg -autoport 5900 -o /var/log/x11vnc.log (code=exited, status=1/FAILURE)
Nov 04 19:29:54 centosmike systemd[1]: Starting VNC Server for X11...
Nov 04 19:29:59 centosmike systemd[1]: x11vnc.service: control process exited, code=exited status=1
Nov 04 19:29:59 centosmike systemd[1]: Failed to start VNC Server for X11.
Nov 04 19:29:59 centosmike systemd[1]: Unit x11vnc.service entered failed state.
Nov 04 19:29:59 centosmike systemd[1]: x11vnc.service failed.
Code: Select all
● gdm.service - GNOME Display Manager
Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-11-04 10:46:16 CET; 8h ago
Main PID: 1249 (gdm)
Tasks: 6
CGroup: /system.slice/gdm.service
├─1249 /usr/sbin/gdm
└─1931 /usr/bin/X :2 -background none -noreset -audit 4 -verbose -auth /run/gdm/auth-for-gdm-hS4z0H/database -seat seat0 -nolisten tcp vt1
Nov 04 10:46:16 centosmike systemd[1]: Starting GNOME Display Manager...
Nov 04 10:46:16 centosmike systemd[1]: Started GNOME Display Manager.
Nov 04 10:46:19 centosmike gdm[1249]: GdmDisplay: display lasted 0.757543 seconds
Nov 04 10:46:19 centosmike gdm[1249]: Child process 1884 was already dead.
Nov 04 10:46:19 centosmike gdm[1249]: Unable to kill session worker process
Nov 04 10:46:19 centosmike gdm[1249]: GdmDisplay: display lasted 0.201674 seconds
Nov 04 10:46:19 centosmike gdm[1249]: GLib: g_variant_new_string: assertion 'string != NULL' failed
Code: Select all
MIT-MAGIC-COOKIE-1
# x11vnc
Code: Select all
04/11/2018 19:20:02 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 16557
04/11/2018 19:20:02 Using X display :2
04/11/2018 19:20:02 rootwin: 0x127 reswin: 0x2e00001 dpy: 0x29629c0
--------------------------------------------------------
04/11/2018 19:20:02
04/11/2018 19:20:02 Default visual ID: 0x21
04/11/2018 19:20:02 Read initial data from X display into framebuffer.
04/11/2018 19:20:02 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/10240
04/11/2018 19:20:02
04/11/2018 19:20:02 X display :2 is 32bpp depth=24 true color
/var/log/x11vnc.log ,
Code: Select all
04/11/2018 19:29:55 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 17240
04/11/2018 19:29:55 XOpenDisplay("") failed.
04/11/2018 19:29:55 Trying again with XAUTHLOCALHOSTNAME=localhost ...
04/11/2018 19:29:55 ^G
04/11/2018 19:29:55 *** XOpenDisplay failed. No -display or DISPLAY.
04/11/2018 19:29:55 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
04/11/2018 19:29:55 *** 1 2 3 4•
04/11/2018 19:29:59 XOpenDisplay(":0") failed.
04/11/2018 19:29:59 Trying again with XAUTHLOCALHOSTNAME=localhost ...
04/11/2018 19:29:59 XOpenDisplay(":0") failed.
04/11/2018 19:29:59 Trying again with unset XAUTHLOCALHOSTNAME ...
04/11/2018 19:29:59•
04/11/2018 19:29:59 ***************************************
04/11/2018 19:29:59 *** XOpenDisplay failed (:0)
*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.
Have you any suggestion?