1

I have a fresh Arch Linux installation,

[0s] $ uname -a
Linux fermata 4.8.11-1-ARCH #1 SMP PREEMPT Sun Nov 27 09:26:14 CET 2016 x86_64 GNU/Linux

on to which I've installed, enabled, and started xrdp:

systemctl --type="server"
...
xrdp-sesman.service     loaded active running xrdp session manager
xrdp.service            loaded active running xrdp daemon

I also have vncserver running on :0

[0s] $ vncserver -list

TigerVNC server sessions:

X DISPLAY # PROCESS ID
:0          615

Here are the ports that are being listened to:

[0s] $ sudo lsof -Pi | grep LISTEN
...
sshd       361 root    3u  IPv4  15595      0t0  TCP *:22 (LISTEN)
sshd       361 root    4u  IPv6  15597      0t0  TCP *:22 (LISTEN)
xrdp-sesm  370 root    7u  IPv4  15228      0t0  TCP localhost.localdomain:3350 (LISTEN)
xrdp       375 root    7u  IPv4  16056      0t0  TCP *:3389 (LISTEN)
Xvnc       615 mark    4u  IPv4  14285      0t0  TCP *:5900 (LISTEN)
Xvnc       615 mark    5u  IPv6  14286      0t0  TCP *:5900 (LISTEN)
...

I'm trying to connect to the Arch box from macOS Sierra, so I downloaded and installed Microsoft Remote Desktop (Version 8.0.36 (Build 27228)) and created a profile that specifies the IP address of the Arch box, and has my Arch user account and password.

When I try to connect I get a grey box with the following messages:

connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to session manager, please wait...
xrdp_mm_process_login_response: login successful for display 10
VNC started connecting
VNC connecting to 127.0.0.1 5910
VNC error - problem connecting

I noted that the login was successful for display 10, and thinking that I needed to have VNC operating on :10 rather than :0, I killed the :0 session and stated a new on on :10. I get the same error as above with the line

...
xrdp_mm_process_login_response: login successful for display 11
...

Here is the output from the journal:

[0s] $ journalctl -f -u xrdp
-- Logs begin at Sat 2016-12-03 20:28:10 CST. --
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC Error after security negotiation
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC error before sending share flag
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC error before receiving server init
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC error before receiving pixel format
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC error before receiving name length
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC error before receiving name
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] xrdp_mm_module_cleanup
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[DEBUG] VNC mod_exit
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[INFO ] An established connection closed to endpoint: NULL:NULL - socket: 12
Dec 06 08:05:25 fermata XRDP[4451]: (4451)(139899817027328)[INFO ] An established connection closed to endpoint: 127.0.0.1:3350 - socket: 11

iptables is empty:

[3s] $ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Along the way I have added both a .Xclient and a .xsession file to my home directory, and tried gnome-session and i3-session in those files:

I also made a backup copy of /etc/xrdp/startwm and changed the original to have just

#!/bin/sh
gnome-session

I've also tried i3-session and xfce-session here, those being the other environments installed.

When I tail `.vnc/fermata:10.log I see this:

** (nm-applet:4314): WARNING **: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (nm-applet:4314): WARNING **: AT-SPI: Could not obtain desktop path or name


** (nm-applet:4314): WARNING **: AT-SPI: Could not obtain desktop path or name

polybars launched...
polybar|error  Monitor "HDMI2" not found or disconnected
polybar|error  Monitor "HDMI2" not found or disconnected

polybar is part of my i3 setup, so VNC at least is pointing to the session I ultimately want.

Obviously I'm missing some crucial piece between xrdp and VNC. I don't have any idea what that piece is.

  • I found this documentation, linux.die.net/man/5/sesman.ini, and in particular the X11DisplayOffset setting. The default is 10 to "prevent sesman from interfering with real X11 servers." This explains why the xrdp_mm_process_login_response: login successful for display 10 message shows a 10, and why the subsequent VNC line shows port 5910. The /var/log/xrdp-sesman.log file shows it's trying :10 as well: [20161206-22:23:50] [INFO ] Xvnc start:Xvnc :10 -geometry 1920x1080 -depth 24 -rfbauth /home/mark/.vnc/sesman_mark_passwd -bs -ac -nolisten tcp -localhost -dpi 96 – Mark Nichols Dec 7 '16 at 4:33
  • Running the command from the xrdp-sesman.log gets this result: Xvnc TigerVNC 1.7.0 - built Sep 8 2016 19:36:24 Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt) See http://www.tigervnc.org for information on TigerVNC. Underlying X server release 11804000, The X.Org Foundation Tue Dec 6 22:34:08 2016 vncext: VNC extension running! vncext: Listening for VNC connections on local interface(s), port 5910 vncext: created VNC server for screen 0 Why is it connecting on screen 0? – Mark Nichols Dec 7 '16 at 4:35
1

You don't have to pre-start a vnc session, xrdp does that for you (which is why it was starting :10 when you had :0 started, and when you had :10 started, it started on :11).

Window-manager typically goes in $HOME/.xsessionrc

The VNC session will exit when your .xsessionrc exits.. one thing you can do for a failsafe is try to run /usr/bin/xterm instead of a window manager. This take all the complicatedness out of "Did my window manager run?". If you get a screen with a single xterm, then you know you have the xrdp process working and are now working on a window manager issue.

  • I killed the :10 VNC session. I reverted the /etc/xrdp/startwm script back to its original state (which starts twm and xterm), and I moved .xsession to .xsessionrc and changed it's contents to be xterm. After restarting xrdp, I get the same error messages as before. So, it appears the issue is an xrdp/vnc issue and not a window manager issue. – Mark Nichols Dec 6 '16 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.