LibVNC / x11vnc

a VNC server for real X displays
GNU General Public License v2.0
723 stars 142 forks source link

Can't create x session using -create #111

Open iouwon opened 5 years ago

iouwon commented 5 years ago

Using Ubuntuj 18.04 when it tries to create an x session it fails because the find display cmd fails

When i use this service definition for a systemd service:

[Unit]
Description=x11vnc service
Requires=autossh-xrdp-x11vnc-tunnel.service
After=multi-user.target

[Service]
User=iouwon
Environment="UNIXPW_DISABLE_SSL=1"
ExecStart=/usr/bin/x11vnc -localhost -forever -loop -env FD_XDM=1 -auth guess -shared -repeat -noxdamage -create -unixpw -unixpw_system_greeter -scale_cursor 1/2

[Install]
WantedBy=multi-user.target

and restart the machine and get to the login screen, then try to connect via xrdp it fails and I see this in the x11vnc journal: Aug 27 00:28:23 my-server x11vnc[1847]: 27/08/2019 00:28:23 wait_for_client: running: env X11VNC_SKIP_DISPLAY='' /bin/sh /tmp/x11vnc-find_display.Jm8N05 Aug 27 00:28:23 my-server x11vnc[1847]: 27/08/2019 00:28:23 su_verify: 'me' for command. Aug 27 00:28:24 my-server su[1897]: Successful su for me by me Aug 27 00:28:24 my-server su[1897]: + /dev/pts/0 me:me Aug 27 00:28:24 my-server su[1897]: pam_unix(su:session): session opened for user me by (uid=1000) Aug 27 00:28:24 my-server su[1897]: pam_unix(su:session): session closed for user me Aug 27 00:28:24 my-server x11vnc[1847]: 27/08/2019 00:28:24 wait_for_client: find display cmd failed.

bk138 commented 5 years ago

Hi @iouwon, have you tried with different versions of x11vnc? Which version are you using?

iouwon commented 5 years ago

I've not tried any other version and the version I'm currently on is: x11vnc: 0.9.13 lastmod: 2011-08-10

Just to be clear, if I log in on the machine directly, starting that users x session, x111vnc is able to find the x session and connects and I'm able to control the session remotely

it's only when i try to create the x session remotely that i get the failure

bk138 commented 5 years ago

Please try with a newer release.