Unable to start remote desktop server x11vnc xrdp

I followed the procedure described in https://developer.nvidia.com/drive/learn/tutorial-remoteOGL

However, when I do :

sudo service xrdp restart

The service fails to restart with the following error:

● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-09-21 01:17:55 UTC; 7min ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
  Process: 18239 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=1/FAILURE)
  Process: 18231 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)

Sep 21 01:17:55 tegra-ubuntu systemd[1]: Starting xrdp daemon...
Sep 21 01:17:55 tegra-ubuntu systemd[1]: xrdp.service: Control process exited, code=exited status=1
Sep 21 01:17:55 tegra-ubuntu systemd[1]: xrdp.service: Failed with result 'exit-code'.
Sep 21 01:17:55 tegra-ubuntu systemd[1]: Failed to start xrdp daemon.

running journalctl -xe returns the following lines

Sep 21 01:33:42 tegra-ubuntu avahi-daemon[675]: Registering new address record for 192.168.1.200 on eth0.IPv4.
Sep 21 01:33:42 tegra-ubuntu avahi-daemon[675]: Registering new address record for 10.1.0.81 on eth0.IPv4.
Sep 21 01:33:42 tegra-ubuntu avahi-daemon[675]: Registering new address record for ::1 on lo.*.
Sep 21 01:33:42 tegra-ubuntu avahi-daemon[675]: Registering new address record for 127.0.0.1 on lo.IPv4.
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]:  --- x11vnc loop: waiting for: 23978
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:42 passing arg to libvncserver: -rfbauth
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:42 passing arg to libvncserver: /home/nvidia/.x11vnc.
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:42 passing arg to libvncserver: -rfbport
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:42 passing arg to libvncserver: 5900
Sep 21 01:33:42 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:42 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 2
Sep 21 01:33:43 tegra-ubuntu x11vnc[1390]: xauth:  unable to generate an authority file name
Sep 21 01:33:43 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:43 -auth guess: failed for display='unset'
Sep 21 01:33:43 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:43 -auth guess: since we are root, retrying with FD_X
Sep 21 01:33:43 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:43 -auth guess: failed for display='unset'
Sep 21 01:33:43 tegra-ubuntu x11vnc[1390]:  --- x11vnc loop: sleeping 2000 ms ---
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]:  --- x11vnc loop: 713 ---
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]:  --- x11vnc loop: waiting for: 24094
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:45 passing arg to libvncserver: -rfbauth
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:45 passing arg to libvncserver: /home/nvidia/.x11vnc.
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:45 passing arg to libvncserver: -rfbport
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:45 passing arg to libvncserver: 5900
Sep 21 01:33:45 tegra-ubuntu x11vnc[1390]: 21/09/2019 01:33:45 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 2
Sep 21 01:33:46 tegra-ubuntu x11vnc[1390]: xauth:  unable to generate an authority file name
1 Like

Hi @karthik.parameswaran,

I just found a page about this. It seems something to do with changing back to gnome desktop from unity of ubuntu 18.04? Could you take a look or search if any solution in relevant communities? Thanks!

1 Like

Hello @karthik.parameswaran ,

I faced same issue and solved it. Let me share it.
Most of the process is equal to the tutorial.

I need to change some points as following.

  • x11vnc.service
    • Swap auth option.
    • Old: -auth guess
    • New: -auth /run/user/1000/gdm/Xauthority
  • xrdp.ini
    • Keep default ini file or you can move “[console]” section to above “[Xorg]” section to make it default.
  • xrdp-sesman.service
    • To avoid failing start at bootup, follow workaround from the issue xrdp-sesman fails to start at bootup.
    • Edit /lib/systemd/system/xrdp-sesman.service
    • Add “ExecStartPre=/bin/sleep 20” to the [Service] section of the file.
  • After reboot, it works. You need to wait some minutes to wait x11vnc service active. I don’t know why it takes so long time.
  • Connect with XRDP client, choose “console” not “Xorg” and input password.

There were two issue to fail remote desktop. First one was x11vnc failed authentication and second was xrdp-sesman failed to run at boottime.

FYI: We need a connected monitor yet. I tried xserver-xorg-video-dummy but I think I need more try-and-error. I hope someone open a way to headless setup.

I found new FAQ for remote desktop and it worked perfectly. I feel it is simple and nice.

FYI: I used Remmina on Ubuntu 18.04. When I set color depth as 8bpp, window closed soon after shown up. Higher depth works perfectly. e.g. 16bpp, 24bpp.

3 Likes

Hi Hiroshi,

The script makes it much easier and I can confirm that it works and needs minimal effort.
Thanks for the solution.

Alternatively, I was also able to get it to run by:

  1. Installing unity desktop (with gdm3 as the display manager)
  2. Configuring the vino-server on the newly installed unity desktop
  3. Connect with Remmina
1 Like