[HELP] XRDP not working CentOS

General support questions
eNkrypt
Posts: 13
Joined: 2011/02/01 19:01:02
Contact:

[HELP] XRDP not working CentOS

Post by eNkrypt » 2014/03/04 03:12:45

Hello guys,

I have been trying for about 5 hours to get this to work with no avail! So needless to say, I am burnt out!

Let me first explain what I did to get to where I am at.

I tried following this tutorial to get XRDP working on my CentOS 6.5(final) server:
http://ajmatson.net/wordpress/2014/01/i ... entos-6-5/

Which didn't work - So I googled some more and came across this tutorial:
http://nearlydeaf.com/?p=1122

Which seemed to have a lot more steps with getting XRDP to work - So I followed it and installed XRDP through the EPEL which was version 0.5.0 and then installed 0.6.1 through sourceforge using the make command.

From there I setup everything exactly as the tutorial explained - And I couldn't get even the RDP to connect. So I played around with the SESMAN.ini settings and removed the followling lines:

Code: Select all

TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins
Which worked! I was able to get past the RDP screen without it denying my users (both root and christopher)

Now my problem is once it get's passed the RDP login screen, it now gives this error:

Code: Select all

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
started connecting
connecting to 127.0.0.1 5910
error - problem connecting
When checking the log file this is what I get:

Code: Select all

[20140303-14:55:47] [INFO ] scp thread on sck 7 started successfully
[20140303-14:55:48] [INFO ] ++ created session (access granted): username root, ip HIDDEN:62348 - socket: 7
[20140303-14:55:48] [INFO ] starting Xvnc session...
[20140303-14:55:58] [ERROR] X server for display 10 startup timeout
[20140303-14:55:58] [INFO ] starting xrdp-sessvc - xpid=26266 - wmpid=26265
[20140303-14:55:58] [ERROR] X server for display 10 startup timeout
[20140303-14:55:58] [ERROR] another Xserver is already active on display 10
[20140303-14:55:58] [DEBUG] aborting connection...
[20140303-14:55:58] [INFO ] ++ terminated session:  username root, display :10.0, session_pid 26264, ip HIDDEN:62348 - socket: 7
[20140303-15:10:49] [INFO ] scp thread on sck 7 started successfully
[20140303-15:10:49] [INFO ] ++ created session (access granted): username christopher, ip HIDDEN:62348 - socket: 7
[20140303-15:10:49] [INFO ] starting Xvnc session...
[20140303-15:10:59] [ERROR] X server for display 10 startup timeout
[20140303-15:10:59] [INFO ] starting xrdp-sessvc - xpid=26321 - wmpid=26320
[20140303-15:10:59] [ERROR] X server for display 10 startup timeout
[20140303-15:10:59] [ERROR] another Xserver is already active on display 10
[20140303-15:10:59] [DEBUG] aborting connection...
[20140303-15:10:59] [INFO ] ++ terminated session:  username christopher, display :10.0, session_pid 26319, ip HIDDEN:62348 - socket: 7
Here is my xrdp.ini file:

Code: Select all

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=low
channel_code=1
max_bpp=24
#black=000000
#grey=d6d3ce
#dark_grey=808080
#blue=08246b
#dark_blue=08246b
#white=ffffff
#red=ff0000
#green=00ff00
#background=626c72

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

[xrdp2]
name=console
lib=libvnc.so
ip=127.0.0.1
port=5900
username=na
password=ask

[xrdp3]
name=vnc-any
lib=libvnc.so
ip=ask
port=ask5900
username=na
password=ask

[xrdp4]
name=sesman-any
lib=libvnc.so
ip=ask
port=-1
username=ask
password=ask

[xrdp5]
name=rdp-any
lib=librdp.so
ip=ask
port=ask3389

[xrdp6]
name=freerdp-any
lib=libxrdpfreerdp1.so
ip=ask
port=ask3389
username=ask
password=ask

[xrdp7]
name=sesman-X11rdp
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
xserverbpp=24
Here is my sesman.ini file:

Code: Select all

[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh

[Security]
AllowRootLogin=1
MaxLoginRetry=4

[Sessions]
X11DisplayOffset=10
MaxSessions=10
KillDisconnected=0
IdleTimeLimit=0
DisconnectedTimeLimit=0

[Logging]
LogFile=/var/log/xrdp-sesman.log
LogLevel=DEBUG
EnableSyslog=0
SyslogLevel=DEBUG

[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp

[Xvnc]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-localhost
param6=-dpi
param7=96
Now, I have uninstalled everything, and reinstalled everything twice, still getting the same error.

Any help would be extremely appreciated! My head is killing me!

If you need anymore information let me know!

Oh and CSF has been disabled during testing!

-Christopher

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [HELP] XRDP not working CentOS

Post by TrevorH » 2014/03/04 09:22:55

First, this..
installed XRDP through the EPEL which was version 0.5.0 and then installed 0.6.1 through sourceforge using the make command.
Don't do that. Now you have a package installed and you've overwritten some of its files with ones from the source install. If there's an update to the package from EPEL then it will overwrite those overwritten files and it's likely to stop working. On a packaged distribution, you are best off using only packages.

It looks to me like your main problem is that you have configured it to listen on 127.0.0.1 only so you would need to connect to that from outside over an ssh session using an ssh tunnel. Are you doing that?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

eNkrypt
Posts: 13
Joined: 2011/02/01 19:01:02
Contact:

Re: [HELP] XRDP not working CentOS

Post by eNkrypt » 2014/03/04 21:13:42

I don't think I quite understand what you are saying.

I wonder why the tutorial says to update the EPEL package with the sourceforge one. It works when they do it. When I make uninstall the package and then install the one with epel NOTHING works, can't even connect at all - So following the steps in the tutorial gets me further than just doing the EPEL install - So the way I have it is working, vs the way you say to do it - doesn't work at all.

I have it set to listen on 127.0.0.1 because the server itself is connecting to the VNC server, not sure I understand why you would need to SSH tunnel - I am not having problems connecting to the RDP server. The problem is RDP -> VNC which is connecting VIA localhost.

TiTex
Posts: 36
Joined: 2014/01/21 10:36:33
Location: Cluj-Napoca, Romania

Re: [HELP] XRDP not working CentOS

Post by TiTex » 2014/03/05 18:45:30

i just tried to install XRDP on a testing machine and it's working out of the box.
installed normally trough yum install xrdp from epel repo.
opened port 3389 on the firewall, and i can login just fine from a windows computer

steps i did
yum install xrdp
service xrdp start
netstat -ntlpu | grep xrdp #to see on which port is listening
edited /etc/sysconfig/iptables and added
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3389 -j ACCEPT
before the REJECT rule , and restarted iptables
service iptables restart

and that's it ... i can connect with windows remote desktop client without any issue

eNkrypt
Posts: 13
Joined: 2011/02/01 19:01:02
Contact:

Re: [HELP] XRDP not working CentOS

Post by eNkrypt » 2014/03/06 00:16:23

Hmm, so you didn't even have to install the VNC server? Or was that installed by yum because of dependency? If so, did you not setup the VNC server at all?

TiTex
Posts: 36
Joined: 2014/01/21 10:36:33
Location: Cluj-Napoca, Romania

Re: [HELP] XRDP not working CentOS

Post by TiTex » 2014/03/06 15:11:22

when i run yum install xrdp , tigervnc was also installed as a dependency and i didn't start a vnc server separately only service xrdp start

Code: Select all

[root@centosdesk ~]# service xrdp start
Starting xrdp:                                             [  OK  ]
Starting xrdp-sesman:                                      [  OK  ]

eNkrypt
Posts: 13
Joined: 2011/02/01 19:01:02
Contact:

Re: [HELP] XRDP not working CentOS

Post by eNkrypt » 2014/03/06 16:37:21

That's interesting - I for the life of me can't get this to work.

I uninstalled, and did exactly what you did but it hangs.

I configured VNC and tried to connect via VNC and it worked fine.

I just can't seem to get XRDP working.

It hangs on this screen:
Image

I am definitely stumped now.

Care to share what your connection log displays and your Sesman.ini file along with xrdp.ini?

TiTex
Posts: 36
Joined: 2014/01/21 10:36:33
Location: Cluj-Napoca, Romania

Re: [HELP] XRDP not working CentOS

Post by TiTex » 2014/03/06 17:32:16

could because you messed up the installed package with the one compiled from source

Code: Select all

[root@centosdesk ~]# cat /etc/xrdp/xrdp.ini 

[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=high
channel_code=1

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
and

Code: Select all

[root@centosdesk ~]# cat /etc/xrdp/sesman.ini 
[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh

[Security]
AllowRootLogin=1
MaxLoginRetry=4
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins

[Sessions]
X11DisplayOffset=10
MaxSessions=10
KillDisconnected=0
IdleTimeLimit=0
DisconnectedTimeLimit=0

[Logging]
LogFile=/var/log/xrdp-sesman.log
LogLevel=DEBUG
EnableSyslog=0
SyslogLevel=DEBUG

[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-localhost
param6=-dpi
param7=96

[Xvnc]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-localhost
param6=-dpi
param7=96
unfortunately my sesman log doesn't have much info ... or does it have some other logs aswell ?

Code: Select all

[20140306-19:22:05] [INFO ] scp thread on sck 7 started successfully
[20140306-19:22:05] [INFO ] ++ created session (access granted): username alex, ip 10.8.1.2:54309 - socket: 7
[20140306-19:22:05] [INFO ] starting Xvnc session...
[20140306-19:22:06] [INFO ] starting xrdp-sessvc - xpid=3067 - wmpid=3066

eNkrypt
Posts: 13
Joined: 2011/02/01 19:01:02
Contact:

Re: [HELP] XRDP not working CentOS

Post by eNkrypt » 2014/03/06 23:39:08

Well I uninstalled the source file, and the EPEL one and just installed the EPEL one and it still didn't work.

It shows in your ini that you have tsusers and tsadmin groups only allowed to connect.

For me, if I didn't add those groups to my main account it wouldn't work - Did you not have to setup the tsadmin and tsusers?

That's the only log I was talking about - I guess my server is just messed up somehow :\

This is the main error that's causing the problem:

Code: Select all

[20140303-15:10:59] [INFO ] starting xrdp-sessvc - xpid=26321 - wmpid=26320
[20140303-15:10:59] [ERROR] X server for display 10 startup timeout
[20140303-15:10:59] [ERROR] another Xserver is already active on display 10
[20140303-15:10:59] [DEBUG] aborting connection...
Dunno what to do about it.

TiTex
Posts: 36
Joined: 2014/01/21 10:36:33
Location: Cluj-Napoca, Romania

Re: [HELP] XRDP not working CentOS

Post by TiTex » 2014/03/07 07:31:55

take a look at this or this , maybe it will help you
by the way i tested xrdp on a fresh install and up to date centos 6.5 x86 (32bit)

No , i don't have either tsadmins or tsusers groups on my box and the man page says
TerminalServerUsers=tsusers
Only the users belonging to the group tsusers are allowed to
login on terminal server.
If unset or set to an invalid or non-existent group, login for
all users is enabled.

TerminalServerAdmins=tsadmins
Sets the group which a user shall belong to have session
management rights.
-this option is currently ignored!-

Post Reply