Hi, I have xrdp 0.9.1 on ubuntu 16.04 and I want to connect to kvm vm via vnc using xrdp. When I'm connecting I get
VNC error - problem connecting
some error
Here is the log:
[20170531-09:28:33] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170531-09:28:33] [DEBUG] xrdp_wm_log_msg: VNC connecting to localhost 5901
[20170531-09:28:36] [DEBUG] VNC error 1 after security negotiation
[20170531-09:28:36] [DEBUG] VNC error before sending share flag
[20170531-09:28:36] [DEBUG] VNC error before receiving server init
[20170531-09:28:36] [DEBUG] VNC error before receiving pixel format
[20170531-09:28:36] [DEBUG] VNC error before receiving name length
[20170531-09:28:36] [DEBUG] VNC error before receiving name
[20170531-09:28:36] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20170531-09:28:36] [DEBUG] Closed socket 16 (AF_INET6 :: port 33870)
[20170531-09:28:36] [DEBUG] xrdp_wm_log_msg: some problem
[20170531-09:28:36] [ERROR] xrdp_wm_log_msg: Error connecting to: localhost
[20170531-09:28:36] [DEBUG] xrdp_mm_module_cleanup
[20170531-09:28:36] [DEBUG] VNC mod_exit
[20170531-09:28:36] [DEBUG] return value from xrdp_mm_connect 1
The vnc server should be working, because I was able to connect to it via vnc client.
Please may you help me?
Can you try uncomment delay_ms in xrdp.ini?
@metalefty I did and the same error. This is the section, everything else should be default.
[Xvnc]
name=Xvnc
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=ask
#xserverbpp=24
delay_ms=2000
I am getting the same error on Fedora 24, 25 and 26 beta.
If you follow instructions written in README.Fedora, how is it going?
http://pkgs.fedoraproject.org/cgit/rpms/xrdp.git/tree/README.Fedora?h=f25&id=12a8dc25dd6df49335eb643c55e18abdb084b4d5
I assume this issue is identical to #755.
Regarding xorgxrdp, there is no such file /etc/X11/Xwrapper.config.
Regarding SELinux, xrdp-selinux had not been installed. However, the problem persists after installing and restarting the machine.
Regarding #755, I never see a desktop so there is no opportunity to use the clipboard.
Sent from my iPhone
On Jun 22, 2017, at 7:41 PM, metalefty notifications@github.com wrote:
If you follow instructions written in README.Fedora, how is it going?
http://pkgs.fedoraproject.org/cgit/rpms/xrdp.git/tree/README.Fedora?h=f25&id=12a8dc25dd6df49335eb643c55e18abdb084b4d5I assume this issue is identical to #755.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
I did update sesman.ini as recommended by #755, but the problem persists.
I guess I should mention that I have these versions installed:
tigervnc-server-minimal.x86_64 1.8.0-1.fc26
xorgxrdp.x86_64 0.2.2-1.fc26
xrdp.x86_64 1:0.9.2-12.fc26
xrdp-selinux.x86_64 1:0.9.2-12.fc26
I meant VNC part of README.Fedora. You can ignore other parts. Thanks for version info.
I did update the Xvnc stanza of /etc/xrdp/sesman.ini, but the problem persists.
[Xvnc]
param=Xvnc
param=-bs
param=-nolisten
param=tcp
param=-localhost
param=-dpi
param=96
param=-AcceptCutText=0
param=-SendCutText=0
param=-SendPrimary=0
param=-SetPrimary=0
Same as above on CentOS 7.3 (fully patched).
TigerVNC's version is 1.3.1 on CentOS 7 so the above fixes don'y apply since the Fedora readme indicates it's for TigerVNC >= 1.8.0. Trying to use them results in a Unrecognized option: -SendPrimary=0.
OK, it turned out that this issue is not identical to #755. Let's forget everything about #755.
Is there any other information you need to help resolve this issue?
Ubuntu 16.04.2 LTS xrdp 0.9.2
[20170714-15:47:21] [INFO ] xrdp_wm_log_msg: login successful for display 12
[20170714-15:47:21] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170714-15:47:21] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5912
[20170714-15:47:24] [DEBUG] VNC error 1 after security negotiation
[20170714-15:47:24] [DEBUG] VNC error before sending share flag
[20170714-15:47:24] [DEBUG] VNC error before receiving server init
[20170714-15:47:24] [DEBUG] VNC error before receiving pixel format
[20170714-15:47:24] [DEBUG] VNC error before receiving name length
[20170714-15:47:24] [DEBUG] VNC error before receiving name
[20170714-15:47:24] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20170714-15:47:24] [DEBUG] Closed socket 25 (AF_INET 0.0.0.0:42388)
[20170714-15:47:24] [DEBUG] xrdp_wm_log_msg: some problem
[20170714-15:47:24] [DEBUG] xrdp_mm_module_cleanup
[20170714-15:47:24] [DEBUG] VNC mod_exit
[20170714-15:47:24] [DEBUG] Closed socket 24 (AF_INET 127.0.0.1:40894)
[20170714-15:47:31] [DEBUG] Closed socket 12 (AF_INET 192.168.125.18:3389)
[20170714-15:47:31] [DEBUG] xrdp_mm_module_cleanup
[20170714-15:47:32] [ERROR] Listening socket is in wrong state, terminating list
ener
https://pastebin.com/u54NN1Wp
Fedora 26 xrdp 0.9.3
firewall/selinux disabled
[20170714-15:39:06] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20170714-15:39:06] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20170714-15:39:06] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20170714-15:39:09] [DEBUG] VNC error 1 after security negotiation
[20170714-15:39:09] [DEBUG] VNC error before sending share flag
[20170714-15:39:09] [DEBUG] VNC error before receiving server init
[20170714-15:39:09] [DEBUG] VNC error before receiving pixel format
[20170714-15:39:09] [DEBUG] VNC error before receiving name length
[20170714-15:39:09] [DEBUG] VNC error before receiving name
[20170714-15:39:09] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20170714-15:39:09] [DEBUG] Closed socket 25 (AF_INET 0.0.0.0:50184)
[20170714-15:39:09] [DEBUG] xrdp_wm_log_msg: some problem
[20170714-15:39:09] [DEBUG] xrdp_mm_module_cleanup
[20170714-15:39:09] [DEBUG] VNC mod_exit
[20170714-15:39:09] [DEBUG] Closed socket 24 (AF_INET 127.0.0.1:56708)
https://pastebin.com/fSSJgc9f
On Ubuntu at least Xorg session is working
On Fedora 26 i unsuccessfully tried xrdp 0.9.1, 0.9.2, 0.9.3 - Xorg or Xvnc sessions not working, at least for me.
UPD:
After some more experimenting I've found what causing this errors.
Steps to reproduce(I'm using Fedora with "clean" MATE+Lightdm setup):
Install fresh fedora server w/o GUI.
$ sudo dnf groupinstall 'base-x' 'fonts'
$ sudo dnf install mate-desktop mate-control-center mate-terminal mate-settings-daemon caja caja-open-terminal mate-polkit mate-session-manager lightdm-gtk lightdm mate-menus mate-themes mate-panel marco oddjob-mkhomedir xrdp xrdp-selinux
$ sudo authconfig --enablemkhomedir --update
With this setup I stumbled upon:
It is not sufficient to install xrdp-selinux package, you should patch, recompile and reinstall xrdp policy:
$ cd /usr/share/doc/xrdp-selinux/
$ sudo cp xrdp.te{,.old}
$ sudo cat << EOF > xrdp.patch
+++ xrdp.te 2017-07-18 12:52:23.413395457 +0300
@@ -4,6 +4,8 @@
type unconfined_service_t;
type unconfined_t;
type xserver_exec_t;
+ type oddjob_t;
+ type oddjob_mkhomedir_exec_t;
class process transition;
class file entrypoint;
}
@@ -11,7 +13,12 @@
#============= unconfined_service_t ==============
allow unconfined_service_t unconfined_t:process transition;
+allow unconfined_service_t oddjob_mkhomedir_exec_t:file entrypoint;
#============= unconfined_t ==============
allow unconfined_t xserver_exec_t:file entrypoint;
+
+#============= oddjob_t ==============
+
+allow oddjob_t unconfined_service_t:process transition;
\ No newline at end of file
EOF
$ sudo patch xrdp.te xrdp.patch
$ sudo checkmodule -M -m -o xrdp.mod xrdp.te
$ sudo semodule_package -o xrdp.pp -m xrdp.mod
$ sudo semodule -i xrdp.pp
Eliminating this two conditions gives me working xrdp with Xvnc session, but much faster Xorg session still gives me [DEBUG] Closed socket 25 (AF_UNIX) errors.
To make Xorg session working properly I have to make additional Xorg.wrap rights adjustments.
After that I have fully working xrdp setup on Fedora 26:
$ sudo rpm -qa | egrep "rdp|^selin"
selinux-policy-3.13.1-260.1.fc26.noarch
selinux-policy-targeted-3.13.1-260.1.fc26.noarch
xrdp-0.9.2-12.fc26.x86_64
xrdp-selinux-0.9.2-12.fc26.x86_64
selinux-policy-minimum-3.13.1-260.1.fc26.noarch
xorgxrdp-0.2.2-1.fc26.x86_64
@grishin-a So you started with Fedora 26 Server and added the Mate desktop and Xrdp with the above modifications and it works. I am starting with Fedora 26 Workstation with the default Gnome desktop and adding Xrdp. Do you have any suggestions on what might be missing from my installation?
It sounds like oddjob-mkhomedir creates the home directory for a user when it does not exist. It is not installed with Fedora 26 Workstation. I am only logging-in to Xrdp using local users that I know exist. Do you know whether oddjob-mkhomedir is required in this situation?
@dean-hunter Sorry for late reply.
No, you don't need oddjob-mkhomedir if you are absolutely sure your user have existing homedir.
Just tried xrdp with clean Fedora26 Worstation (Gnome desktop)install on virtual machine. It works with both Xorg and Xvnc sessions.
$ sudo rpm -qa | egrep 'rdp|vnc'
tigervnc-server-minimal-1.8.0-1.fc26.x86_64
tigervnc-license-1.8.0-1.fc26.noarch
gvnc-0.7.1-1.fc26.x86_64
xrdp-0.9.2-12.fc26.x86_64
xorgxrdp-0.2.3-1.fc26.x86_64
gtk-vnc2-0.7.1-1.fc26.x86_64
Can you try to create a new user and connect?
$ sudo useradd -m test
$ sudo echo 123 | passwd --stdin test
$ sudo systemctl stop firewalld; iptables -F
Connect via rdp(I'm using remmina 1.1.0 client) using Xvnc session.
If you want to connect using Xorg session you need to modify Xwrapper.config
I am creating a VM in https://my.vultr.com/ . OS :- Ubuntu 17.04

getting this error.
the script I run after logging into the terminal of the VM is :--
sudo apt-get update; sudo apt-get -y install lxde ubuntu-gnome-desktop tightvncserver xrdp ; echo lxsession -s LXDE -e LXDE > ~/.xsession ; echo sudo /etc/init.d/xrdp restart ;
.
.
This script works fine for ubuntu 16.04 and ubuntu 14,04. can you tell me what I am doing wrong?
I reproduced the issue. Please wait patiently until the bug is fixed. Not to use VNC is a workaround.
@metalefty, any update on the resolution to this?
I haven't been able to start work on this issue yet because VNC baked session is discouraged now.
This doesn't mean we decided that we won't fix the issue. Request by more users or sponsorship will raise the priority.
Not sure if I understand "VNC baked sessions"; perhaps you could explain further? Is @grishin-a's patch above the fix?
There was a typo, "VNC backed sessions".
His patch fixes home directory creation. It doesn't fix the connection issue to VNC.
Any update by now? I encountered the same connection issue to VNC in Fedora 26 with default Gnome Desktop.
@metalefty what is the connection issue to VNC? If you describe in more detail perhaps one of us could take a look
Something's failing lib_mod_connect() in vnc/vnc.c. As the log says, it looks like an issue in security negotiation.I tried to reproduce the issue again but can't reproduce for me now.
I'd appreciate if someone provides repro.
@abrown The error occurs in this block. https://github.com/neutrinolabs/xrdp/blob/929a7c359d74720474ed138863c59bf65dcb0c96/vnc/vnc.c#L1083-L1128
I experience this issue.
The way I have to require the xrdp server to be configured is to have the following parameters in the config file:
crypt_level=fips
security_layer=rdp
Maybe with those parameters you can reproduce the error.
I know I'm probably an obscure use case, but I'm getting a similar issue with Alpine Linux on Virtualbox. I hope that this info is helpful in finding the root cause of the error. It's also possible that I'm doing something wrong in which case please let me know.
I am able to get the login prompt, but when I try to login I get the error dialogue:

alpine-virt-3.7.0-x86_645.2.4r1197855.2.4r119785I followed instructions here: https://wiki.alpinelinux.org/wiki/Remote_Desktop_Server
apk add xrdp
apk add xrdp-sesman
apk add vino
# cat /etc/xrdp/xrdp.ini
[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=low
channel_code=1
max_bpp=24
[xrdp1]
name=Vino
lib=libvnc.so
ip=127.0.0.1
port=5900
username=ask
password=ask
In my home directory I have tried with both files:
# cat .Xclients
#!/bin/sh
XFCE="$(which xfce4-session 2>/dev/null)"
exec "$XFCE"
# cat .xsession
xfce4-session
I used ufw to allow inbound traffic on ports 22, 3389, 3350, and 5900
In the /etc/xrdp/startwm.sh script I added:
# cat /etc/xrdp/startwm.sh
#!/bin/sh
#start the window manager
wm_start()
{
# ...removed for brevity...
# el
if [ -r /etc/X11/xinit/Xsession ]; then
xfce4-session ## <- this is what I added
. /etc/X11/xinit/Xsession
exit 0
fi
# ...removed for brevity...
# cat /var/log/xrdp.log
[20171223-17:15:31] [INFO ] Socket 12: AF_INET connection received from <ip> port 61045
[20171223-17:15:31] [DEBUG] Closed socket 12 (AF_INET <ip>:3389)
[20171223-17:15:31] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171223-17:15:31] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[20171223-17:15:31] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[20171223-17:15:31] [DEBUG] TLSv1.2 enabled
[20171223-17:15:31] [DEBUG] TLSv1.1 enabled
[20171223-17:15:31] [DEBUG] TLSv1 enabled
[20171223-17:15:31] [DEBUG] Security layer: requested 11, selected 1
[20171223-17:15:33] [INFO ] connected client computer name: <name>
[20171223-17:15:33] [INFO ] TLS connection established from <ip> port 61045: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA
[20171223-17:15:33] [DEBUG] xrdp_00000a22_wm_login_mode_event_00000001
[20171223-17:15:33] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
[20171223-17:15:33] [WARN ] local keymap file for 0x00000409 found and doesn't match built in keymap, using local keymap file
[20171223-17:15:33] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip 127.0.0.1 port 3350
[20171223-17:15:37] [DEBUG] Closed socket 18 (AF_INET 0.0.0.0:37178)
[20171223-17:15:41] [DEBUG] Closed socket 18 (AF_INET 0.0.0.0:37184)
[20171223-17:15:45] [DEBUG] Closed socket 18 (AF_INET 0.0.0.0:37190)
[20171223-17:15:49] [ERROR] xrdp_wm_log_msg: Error connecting to sesman: 127.0.0.1 port: 3350
[20171223-17:15:49] [DEBUG] Closed socket 18 (AF_INET 0.0.0.0:37196)
[20171223-17:15:49] [DEBUG] return value from xrdp_mm_connect 1
[20171223-17:15:49] [DEBUG] Closed socket 12 (AF_INET <ip>:3389)
[20171223-17:15:49] [DEBUG] xrdp_mm_module_cleanup
[20171223-17:15:49] [ERROR] Listening socket is in wrong state, terminating listener
[20171223-17:15:49] [CORE ] shutting down log subsystem...
[20171223-17:19:01] [DEBUG] Closed socket 11 (AF_INET 0.0.0.0:3389)
[20171223-17:19:01] [CORE ] shutting down log subsystem...
There are no seemingly useful messages in /var/log/xrdp-sesman.log but I did find logs in the /sesman.log file:
[20171223-22:19:30] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20171223-22:19:30] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5900
[20171223-22:19:33] [DEBUG] VNC error 1 after security negotiation
[20171223-22:19:33] [DEBUG] VNC error before sending share flag
[20171223-22:19:33] [DEBUG] VNC error before receiving server init
[20171223-22:19:33] [DEBUG] VNC error before receiving pixel format
[20171223-22:19:33] [DEBUG] VNC error before receiving name length
[20171223-22:19:33] [DEBUG] VNC error before receiving name
[20171223-22:19:33] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20171223-22:19:33] [DEBUG] Closed socket 16 (AF_INET 0.0.0.0:47422)
[20171223-22:19:33] [DEBUG] xrdp_wm_log_msg: some problem
[20171223-22:19:33] [ERROR] xrdp_wm_log_msg: Error connecting to: 127.0.0.1
[20171223-22:19:33] [DEBUG] xrdp_mm_module_cleanup
[20171223-22:19:33] [DEBUG] VNC mod_exit
[20171223-22:19:33] [DEBUG] return value from xrdp_mm_connect 1
[20171223-22:19:49] [DEBUG] Closed socket 11 (AF_INET <ip>:3389)
[20171223-22:19:49] [DEBUG] xrdp_mm_module_cleanup
Seems like this is related to issue #847
I had the same error and was able to get xrdp running on kali by simply moving to lxde.
apt install lxde xrdp tigervnc-standalone-server
sudo update-alternatives --config x-session-manager
#chose lxsession
service xrdp-sesman start
service xrdp start
Not ideal but better than nothing.
Hope this helps someone like it helped me. :)
Simplified from https://forums.kali.org/showthread.php?34751-How-to-set-up-xrdp-on-the-AWS-Kali-image
I had the same error as the OP but the fortunate position of having two nearly identical servers, one exhibiting the problem and one not. They are both Gigabyte Brix running Centos 7. I set up my xrdp according to this article https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html
I narrowed my problem down (from this thread and thanks to the previous poster ^) to a Gnome issue. Working server has this list of Gnome packages:
Installed Packages
gnome-abrt.x86_64 0.3.4-8.el7 @base
gnome-bluetooth.x86_64 1:3.20.1-1.el7 @base
gnome-bluetooth-libs.x86_64 1:3.20.1-1.el7 @base
gnome-boxes.x86_64 3.22.4-4.el7 @base
gnome-calculator.x86_64 3.22.3-1.el7 @base
gnome-classic-session.noarch 3.26.2-3.el7 @base
gnome-clocks.x86_64 3.22.1-1.el7 @base
gnome-color-manager.x86_64 3.22.2-2.el7 @base
gnome-contacts.x86_64 3.22.1-1.el7 @base
gnome-desktop3.x86_64 3.22.2-2.el7 @base
gnome-dictionary.x86_64 3.20.0-1.el7 @base
gnome-dictionary-libs.x86_64 3.20.0-1.el7 @base
gnome-disk-utility.x86_64 3.22.1-1.el7 @base
gnome-font-viewer.x86_64 3.22.0-1.el7 @base
gnome-getting-started-docs.noarch 3.22.0-1.el7 @base
gnome-icon-theme.noarch 3.12.0-1.el7 @base
gnome-icon-theme-extras.noarch 3.12.0-1.el7 @base
gnome-icon-theme-legacy.noarch 3.12.0-1.el7 @base
gnome-icon-theme-symbolic.noarch 3.12.0-2.el7 @base
gnome-initial-setup.x86_64 3.22.1-5.el7 @base
gnome-keyring.x86_64 3.20.0-3.el7 @base
gnome-keyring-pam.x86_64 3.20.0-3.el7 @base
gnome-menus.x86_64 3.13.3-3.el7 @base
gnome-online-accounts.x86_64 3.26.2-1.el7 @base
gnome-packagekit.x86_64 3.22.1-2.el7 @base
gnome-packagekit-common.x86_64 3.22.1-2.el7 @base
gnome-packagekit-installer.x86_64 3.22.1-2.el7 @base
gnome-packagekit-updater.x86_64 3.22.1-2.el7 @base
gnome-python2.x86_64 2.28.1-14.el7 @base
gnome-python2-canvas.x86_64 2.28.1-14.el7 @base
gnome-screenshot.x86_64 3.22.0-1.el7 @base
gnome-session.x86_64 3.26.1-11.el7 @base
gnome-session-xsession.x86_64 3.26.1-11.el7 @base
gnome-settings-daemon.x86_64 3.26.2-9.el7 @base
gnome-shell.x86_64 3.26.2-5.el7 @base
gnome-shell-extension-alternate-tab.noarch 3.26.2-3.el7 @base
gnome-shell-extension-apps-menu.noarch 3.26.2-3.el7 @base
gnome-shell-extension-common.noarch 3.26.2-3.el7 @base
gnome-shell-extension-launch-new-instance.noarch 3.26.2-3.el7 @base
gnome-shell-extension-places-menu.noarch 3.26.2-3.el7 @base
gnome-shell-extension-top-icons.noarch 3.26.2-3.el7 @base
gnome-shell-extension-user-theme.noarch 3.26.2-3.el7 @base
gnome-shell-extension-window-list.noarch 3.26.2-3.el7 @base
gnome-software.x86_64 3.22.7-5.el7 @base
gnome-system-log.x86_64 1:3.9.90-3.el7 @base
gnome-system-monitor.x86_64 3.22.2-3.el7 @base
gnome-terminal.x86_64 3.22.1-2.el7 @base
gnome-terminal-nautilus.x86_64 3.22.1-2.el7 @base
gnome-themes-standard.x86_64 3.22.2-1.el7 @base
gnome-tweak-tool.noarch 3.22.0-1.el7 @base
gnome-user-docs.noarch 3.22.0-1.el7 @base
gnome-video-effects.noarch 0.4.3-1.el7 @base
gnome-weather.noarch 3.26.0-1.el7 @base```
and the non-working server _had_:
Installed Packages
gnome-bluetooth.x86_64 1:3.20.1-1.el7 @base
gnome-bluetooth-libs.x86_64 1:3.20.1-1.el7 @base
gnome-desktop3.x86_64 3.22.2-2.el7 @base
gnome-icon-theme.noarch 3.12.0-1.el7 @base
gnome-icon-theme-legacy.noarch 3.12.0-1.el7 @base
gnome-keyring.x86_64 3.20.0-3.el7 @base
gnome-keyring-pam.x86_64 3.20.0-3.el7 @base
gnome-online-accounts.x86_64 3.22.5-1.el7 @base
gnome-session.x86_64 3.22.3-4.el7 @base
gnome-settings-daemon.x86_64 3.22.2-5.el7 @base
gnome-shell.x86_64 3.22.3-17.el7 @base
gnome-themes-standard.x86_64 3.22.2-1.el7 @base
That must be because they are both headless and when configuring I must have installed a full Gnome group to one and just a minimal one (to configure Xfce and x2go) on the broken one.
I then thought gnome-classic-session looked like a promising omission so I installed it and the list on the broken server now looked like this, with dependencies pulled in:
Installed Packages
gnome-bluetooth.x86_64 1:3.20.1-1.el7 @base
gnome-bluetooth-libs.x86_64 1:3.20.1-1.el7 @base
gnome-classic-session.noarch 3.26.2-3.el7 @base
gnome-desktop3.x86_64 3.22.2-2.el7 @base
gnome-icon-theme.noarch 3.12.0-1.el7 @base
gnome-icon-theme-legacy.noarch 3.12.0-1.el7 @base
gnome-keyring.x86_64 3.20.0-3.el7 @base
gnome-keyring-pam.x86_64 3.20.0-3.el7 @base
gnome-menus.x86_64 3.13.3-3.el7 @base
gnome-online-accounts.x86_64 3.22.5-1.el7 @base
gnome-session.x86_64 3.22.3-4.el7 @base
gnome-settings-daemon.x86_64 3.22.2-5.el7 @base
gnome-shell.x86_64 3.26.2-5.el7 @base
gnome-shell-extension-alternate-tab.noarch 3.26.2-3.el7 @base
gnome-shell-extension-apps-menu.noarch 3.26.2-3.el7 @base
gnome-shell-extension-common.noarch 3.26.2-3.el7 @base
gnome-shell-extension-launch-new-instance.noarch 3.26.2-3.el7 @base
gnome-shell-extension-places-menu.noarch 3.26.2-3.el7 @base
gnome-shell-extension-top-icons.noarch 3.26.2-3.el7 @base
gnome-shell-extension-window-list.noarch 3.26.2-3.el7 @base
gnome-themes-standard.x86_64 3.22.2-1.el7 @base
Now after trying to connect (from a Windows box on the LAN) the RDP connection just died, but logging in to the broken server afterwards gave:
[user@host log]$ sudo cat xrdp.log
...
[20180522-22:43:08] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20180522-22:43:08] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC tcp connected
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC security level is 2 (1 = none, 2 = standard)
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC password ok
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC sending share flag
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC receiving server init
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC receiving pixel format
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC receiving name length
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC receiving name
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC sending pixel format
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC sending encodings
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC sending framebuffer update request
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC sending cursor
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: VNC connection complete, connected ok
[20180522-22:43:10] [INFO ] The following channel is allowed: rdpdr (0)
[20180522-22:43:10] [INFO ] The following channel is allowed: rdpsnd (1)
[20180522-22:43:10] [INFO ] The following channel is allowed: cliprdr (2)
[20180522-22:43:10] [INFO ] The following channel is allowed: drdynvc (3)
[20180522-22:43:10] [DEBUG] The allow channel list now initialized for this session
[20180522-22:43:10] [DEBUG] xrdp_wm_log_msg: connected ok
[20180522-22:43:10] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20180522-22:43:10] [DEBUG] Closed socket 18 (AF_INET 127.0.0.1:53214)
[20180522-22:43:10] [DEBUG] Closed socket 20 (AF_UNIX)
[20180522-22:43:10] [DEBUG] Closed socket 12 (AF_INET 10.11.12.55:3389)
[20180522-22:43:10] [DEBUG] xrdp_mm_module_cleanup
[20180522-22:43:10] [DEBUG] VNC mod_exit
[20180522-22:43:10] [DEBUG] Closed socket 19 (AF_INET 127.0.0.1:46278)
So now it was getting past the OP's (and my original) security error. I upgraded/installed a few individual packages, like:
gnome-settings-daemon
gnome-initial-setup
gnome-themes-standard
gnome-terminal
and got it to start up but it's got a full black background, no menus and no terminal option. I'm logging in to it via ssh and the xrdp.log is the same as above, i.e. working. I think the artifacts I'm seeing are Gnome artifacts now. I will install
sudo yum groupinstall 'Server with GUI'
on this machine and cross my fingers rather than continuing to try to piecemeal install what is required but that'll have to wait until I can bring down the services that are running on the machine without disturbing the dependent clients too much.
[SOLVED]
I got the same error in CentOS 7.5 with Xfce desktop. I had struggled for several days with no result.

Recently, I found a solution coincidentally. I created a CentOS 7.5 virtual machine with "minimal" installation. Then I installed xrdp and started xrdp service, without realizing that I didn't have any desktop environment. When I attempted to connect the vm from my Windows, I got definitely the same error stated above.
Soon, I found my stupid mistake, followed by a strange thing: whether installing a desktop environment or not, xrdp always throws the same error. I realized the cause of this issue is not a bug of xrdp, tigervnc-server or Xfce, but the fact that xrdp doesn't know what desktop environment to start, let alone how to start. It's the real problem, and we can fix it easily.
Here were my steps:
# generate a file called .xsession in your home directory, and set default desktop
echo "xfce4-session" > ~/.xsession
# enable execute
chmod a+x ~/.xsession
# restart xrdp service
systemctl restart xrdp
# Hint: It works too if you replace `.xsession` with `.Xclients`
Now, xrdp works perfectly with Xfce and openbox.
Finally, where did I get these names? like ~/.xsession and ~/.Xclients?
Well, I found all these in the following scripts:
startwm.shXsessionXclientsHint: you have to search the location of these files for different platforms
For example, the last part of /etc/X11/xinit/Xsession in CentOS 7.5 says:
# otherwise, take default action
if [ -x "$HOME/.xsession" ]; then
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.xsession"
elif [ -x "$HOME/.Xclients" ]; then
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients"
else
# should never get here; failsafe fallback
exec -l $SHELL -c "xsm"
fi
Apparently, X11 will search $HOME/.xsession and $HOME/.Xclients for desktop environments.
Thank you hzhu212, not only for the fix but also for the clear explanation of what the problem was. Most helpful.
Hi metalefty ,
I have followed hzhu212's steps, but this issue still exist on my system, the log file shows below information:
[20190817-03:14:17] [INFO ] xrdp_wm_log_msg: login successful for display 13
[20190817-03:14:17] [DEBUG] xrdp_wm_log_msg: VNC started connecting
[20190817-03:14:17] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5913
[20190817-03:14:20] [DEBUG] VNC error 1 after security negotiation
[20190817-03:14:20] [DEBUG] VNC error before sending share flag
[20190817-03:14:20] [DEBUG] VNC error before receiving server init
[20190817-03:14:20] [DEBUG] VNC error before receiving pixel format
[20190817-03:14:20] [DEBUG] VNC error before receiving name length
[20190817-03:14:20] [DEBUG] VNC error before receiving name
[20190817-03:14:20] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
Could help me further?
Thanks!
[SOLVED]
I got the same error in CentOS 7.5 with Xfce desktop. I had struggled for several days with no result.
Recently, I found a solution coincidentally. I created a CentOS 7.5 virtual machine with "minimal" installation. Then I installed
xrdpand startedxrdpservice, without realizing that I didn't have any desktop environment. When I attempted to connect the vm from my Windows, I got definitely the same error stated above.Soon, I found my stupid mistake, followed by a strange thing: whether installing a desktop environment or not,
xrdpalways throws the same error. I realized the cause of this issue is not a bug of xrdp, tigervnc-server or Xfce, but the fact that xrdp doesn't know what desktop environment to start, let alone how to start. It's the real problem, and we can fix it easily.Here were my steps:
# generate a file called .xsession in your home directory, and set default desktop echo "xfce4-session" > ~/.xsession # enable execute chmod a+x ~/.xsession # restart xrdp service systemctl restart xrdp # Hint: It works too if you replace `.xsession` with `.Xclients`Now, xrdp works perfectly with Xfce and openbox.
Finally, where did I get these names? like
~/.xsessionand~/.Xclients?Well, I found all these in the following scripts:
startwm.shXsessionXclientsHint: you have to search the location of these files for different platforms
For example, the last part of
/etc/X11/xinit/Xsessionin CentOS 7.5 says:# otherwise, take default action if [ -x "$HOME/.xsession" ]; then exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.xsession" elif [ -x "$HOME/.Xclients" ]; then exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients" elif [ -x /etc/X11/xinit/Xclients ]; then exec -l $SHELL -c "$CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients" else # should never get here; failsafe fallback exec -l $SHELL -c "xsm" fiApparently, X11 will search
$HOME/.xsessionand$HOME/.Xclientsfor desktop environments.
Great Man ...
~/.xsession did the trick for me !
Not sure if this would apply for a lot of people, but I was having the following errors is log
[20200625-23:04:05] [INFO ] A connection received from 127.0.0.1 port 52386
[20200625-23:04:05] [INFO ] ++ created session (access granted): username root, ip 195.233.142.182:65160 - socket: 12
[20200625-23:04:05] [INFO ] starting Xvnc session...
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5911)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6011)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6211)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5922)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6022)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6222)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5923)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6023)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6223)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:5933)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6033)
[20200625-23:04:05] [DEBUG] Closed socket 10 (AF_INET 0.0.0.0:6233)
[20200625-23:04:05] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20200625-23:04:05] [INFO ] calling auth_start_session from pid 23121
[20200625-23:04:05] [DEBUG] Closed socket 8 (AF_INET 127.0.0.1:3350)
[20200625-23:04:05] [DEBUG] Closed socket 9 (AF_INET 127.0.0.1:3350)
[20200625-23:04:05] [INFO ] Xvnc :33 -auth .Xauthority -geometry 1920x1080 -depth 8 -rfbauth /root/.vnc/sesman_passw@Tooling-Server:33 -bs -nolisten tcp -localhost -dpi 96
[20200625-23:04:15] [ERROR] X server for display 33 startup timeout
[20200625-23:04:15] [CORE ] waiting for window manager (pid 23123) to exit
[20200625-23:04:15] [ERROR] X server for display 33 startup timeout
[20200625-23:04:15] [ERROR] another Xserver might already be active on display 33 - see log
[20200625-23:04:15] [DEBUG] aborting connection...
[20200625-23:04:15] [CORE ] window manager (pid 23123) did exit, cleaning up session
[20200625-23:04:15] [INFO ] calling auth_stop_session and auth_end from pid 23121
[20200625-23:04:15] [DEBUG] cleanup_sockets:
[20200625-23:04:15] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdp_chansrv_socket_33
[20200625-23:04:15] [DEBUG] cleanup_sockets: deleting /tmp/.xrdp/xrdpapi_33
[20200625-23:04:15] [INFO ] ++ terminated session: username root, display :33.0, session_pid 23121, ip 195.233.142.182:65160 - socket: 12
Apparently the value -depth 8 was causing the error. Found out that my Windows RDP setting was getting set to "Low Bandwidth" setting and color depth was being set at 8. Changed to default 32 and issue was solved.
In my case, none of the above solutions worked.
my log looked like this:
[20200905-15:23:54] [DEBUG] xrdp_wm_log_msg: VNC connecting to 127.0.0.1 5910
[20200905-15:23:57] [DEBUG] VNC error 1 after security negotiation
[20200905-15:23:57] [DEBUG] VNC error before sending share flag
[20200905-15:23:57] [DEBUG] VNC error before receiving server init
[20200905-15:23:57] [DEBUG] VNC error before receiving pixel format
[20200905-15:23:57] [DEBUG] VNC error before receiving name length
[20200905-15:23:57] [DEBUG] VNC error before receiving name
[20200905-15:23:57] [DEBUG] xrdp_wm_log_msg: VNC error - problem connecting
[20200905-15:23:57] [DEBUG] Closed socket 19 (AF_INET6 ::ffff:127.0.0.1 port 59500)
[20200905-15:23:57] [DEBUG] xrdp_wm_log_msg: some problem
[20200905-15:23:57] [DEBUG] xrdp_mm_module_cleanup
[20200905-15:23:57] [DEBUG] VNC mod_exit
Solved after changing param=Xvnc to vncserver in /etc/xrdp/sesman.ini:
[Xvnc]
param=vncserver
param=-bs
param=-nolisten
param=tcp
param=-localhost
param=-dpi
param=96
Most helpful comment
[SOLVED]
I got the same error in CentOS 7.5 with Xfce desktop. I had struggled for several days with no result.
Recently, I found a solution coincidentally. I created a CentOS 7.5 virtual machine with "minimal" installation. Then I installed
xrdpand startedxrdpservice, without realizing that I didn't have any desktop environment. When I attempted to connect the vm from my Windows, I got definitely the same error stated above.Soon, I found my stupid mistake, followed by a strange thing: whether installing a desktop environment or not,
xrdpalways throws the same error. I realized the cause of this issue is not a bug of xrdp, tigervnc-server or Xfce, but the fact that xrdp doesn't know what desktop environment to start, let alone how to start. It's the real problem, and we can fix it easily.Here were my steps:
Now, xrdp works perfectly with Xfce and openbox.
Finally, where did I get these names? like
~/.xsessionand~/.Xclients?Well, I found all these in the following scripts:
startwm.shXsessionXclientsFor example, the last part of
/etc/X11/xinit/Xsessionin CentOS 7.5 says:Apparently, X11 will search
$HOME/.xsessionand$HOME/.Xclientsfor desktop environments.