Trying to install on Debian 11, not getting too far.
I have been attempting to get auto resizing in xrdp on Debian 10 and now 11 on my spare time for more than 2 years. It seems getting the latest xrdp to work in Debian is not really straight forward.
So due to the individual who had the brilliant idea of actually putting compile instructions in the Readme file (which was previously not there), i finally got it to compile on Debian 11, seemingly without error but now im a bit confused. It appears that its not really installed but rather just bin files available on the system. So again, no documentation anywhere i can find leaves me with little clue about what to do next.
i start the xrdp-sesman and xrdp bins using sudo from an ssh session. i try to connect from remmina and it connects, gets a black screen for a while and does nothing.
In the logs i see: [ERROR] sesman_data_in: scp_process_msg failed [ERROR] sesman_main_loop: trans_check_wait_objs failed, removing trans [ERROR] There is no X server active on display 10 [ERROR] A fatal error has occured attempting to start the window manager on display 10, aborting connection
in /etc/xrdp/sesman.ini everything seems normal, i can even use the sesman file that works fine with xrdp from the debian repository and nothing changes really. I have the same result with Xfce and Cinnamon on Debian 11
I have no idea what im doing really so i have virtually no ability to troubleshoot this and i cant find documentation about how make it work on debian. I'd really appreciate if someone could help me.
Compile instructions are on the Wiki. This is linked to from the README.md. I absolutely agree that this could do with revising.
A couple of pointers:-
- Right now, I'd suggest building the v0.9 branch. The devel branch is undergoing quite a bit of change at the moment, but the v0.9 branch is stable.
- Connecting from Remmina can be awkward with default compile options for xrdp. See this post
With that done, you should be able to get to the xrdp login screen (just using the xrdp executable). We can then work on getting the session started.
On that point, you'll only get so far running sesman from a terminal session. in this mode, sesman will be unable to create a systemd session for the user, as you cannot create one systemd session from the context of another.
Hope that's useful.
HI, thank you for the reply. I did compile v0.9.19 successfully but that's where I got stuck. I did apply the two settings in Remmina referenced in the post you provided and thank you for that but Remmina still gets stuck on a black screen.
Could you elaborate on how exactly use the various bin files, seeing that they're not services, nothing seems very clear when compiling it xrdp directly. Is there a guide or something? i have no idea what I'm doing; this program is painfully ambiguous.
The build should create systemd manifests for the services. You shouldn't need to do anything special to get those.
Have you installed it with sudo make install?
im following the compile instructions on github, including the last command on the list which is sudo make install. All of the commands go through without any errors. I did of course have to install certain packages before ./configure would complete.
sudo apt-get install libpam0g-dev libx11-dev libxfixes-dev libxrandr-dev nasm autoconf libtool
I'm compiling .9.19, should i be using a different version or something?
So after i do sudo make install i do see the bin files of xrdp, xrdp-sesman etc get put onto the system, but no services for xrdp are created, neither xrdp nor for xrdp-sesman. So i dont know if this is normal or what so i start sudo xrdp-sesman and sudo xrdp manually via the terminal, then i try to connect using remmina and KRDC. Both basically have the same result. they seem to connect but you get a blank or black screen, then after a minute or so it disconnects with error or returns to an xorg login window. Or sometimes windows pops up saying.
Connnected to sesman, connection ok sending login info to session manager login successful started connecting connection problem giving up some problem error connecting to user session
I have tried this procedure now on 3 computers, two of which i just freshly installed Debian 11 from scratch. Two of the PCs never had any previous version of Xrdp installed. On all 3 PCs the Xrdp from the Debian repo works perfectly. Copying the default Xrdp config from the debian repo to the new compiled one still yields the same result, it just doesnt work.
I really need auto resizing, its absolutely aweful to log in out or statically assign the resolution. I have literally been trying for 2 YEARS on and off to get auto resizing on debian 10 and now debian 11. Is it just impossible to make anything but this ancient version of xrdp to work on debian? Don't any developers of xrdp even use debian? I would really appreciate anyone who can help me get this working so i can document how to make it work; surely im not the only person in the world who uses debian and thinks VNC is rubbish.
I've just set up a clean Debian 11 VM. I'll have a look at this.
After your sudo make install, are you getting anything for systemctl status xrdp?
Actually i do see the service was created; says xrdp.service; disabled; vendor preset: enabled.
I then do sudo systemctl daemon-reload and sudo systemctl enable for xrdp and xrdp-sesman. Then i start with sudo service xrdp-sesman and xrdp. It fails because the control process exited with error code.
Seems to be same two error in the system log i saw when running it manually: [ERROR] There is no X server active on display 10 [ERROR] A fatal error has occured attempting to start the window manager on display 10, aborting connection
im not sure what that means, maybe its a configuration issue.
@thwerks - can you paste what happens when you do sudo systemctl enable --now xrdp xrdp-sesman?
The most likely reason for the error is the X server needs some configuration.
- If you're trying to use the
Xorgbackend, make sure the path to the Xorg X server is set properly in/etc/xrdp/xrdp.ini. The comments in the file should tell you what to do. - If you're trying to use the
Xvncbackend, you'll need a a VNC server installed. Usesudo apt install tigervnc-standalone-serverto achive this.
In either case, there should be in an error in /etc/xrdp/xrdp-sesman.log indicating what has happened.
after entering sudo systemctl enable --now xrdp xrdp-sesman i get:
Job for xrdp-sesman.service failed because the control process exited with error code. See "systemctl status xrdp-sesman.service" and "journalctl -xe" for details. A dependency job for xrdp.service failed. See 'journalctl -xe' for details.
sesman will not start, service status reveals (code=exited, status=1/FAILURE)
There are no errors in the system log.
the /etc/xrdp/xrdp-sesman.log file doesnt exist, probably because the service has never successfully ran.
as far as /etc/xrdp/xrdp.ini is concerned it looks fine to me but im not exatly sure what settings need to be for xorg on debian. As i stated before, i have also tried using the xrdp.ini file that comes with xrdp from the Debian repo which obviously works with xrdo from the repo, but sadly it doesn't fix the problem with ver .9.19.
i have no idea what to try, im not even getting any error in the system log. I can only get things to somewhat work by running the file manually and even then i only get a black screen, With the service it just fails to start without even an error being produced in the log. I have no idea what to do now.
Have you got the xrdp package installed on the same machine you've tried building on?
That will probably fail, as the shared libraries won't match.
What does sudo xrdp-sesman -n say?
No, i have never installed the xrdp package on the machine in question. i have tried on other machines , but removing the package yields the same result.
sudo xrdp-sesman -n return nothing, no error or any message is returned
It seems astonishing it doesn't create some sort of log in /var/log/xrdp-seman.log.
Try sudo strace xrdp-sesman It'll generate a bigger log, but maybe that will give more clues.
Ok i started another VM from scratch just to be sure we're on the same page.
I'm using Debian 11.4 Xfce Live which you can download here. (https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-xfce.iso)
First I install SSH so i can copy paste the following commands: sudo apt-get update sudo apt-get install openssh-server sudo service sshd start
Then I paste these commands via SSH sudo apt-get -y dist-upgrade sudo apt-get install -y libpam0g-dev libx11-dev libxfixes-dev libxrandr-dev nasm autoconf libtool git libssl-dev bash-completion
mkdir ~/apps cd ~/apps git clone https://github.com/neutrinolabs/xrdp cd ~/apps/xrdp ./bootstrap ./configure make sudo make install sudo systemctl enable --now xrdp xrdp-sesman
After entering this last command the service is started successfully. i can connect and authenticate but then i get a black screen for a few minutes, then i get the error as stated earlier.
At that point, if i entered sudo xrdp-sesman -n it would say "xrdp-sesman is already running." which is to be expected. After entering "sudo systemctl enable --now xrdp xrdp-sesman" services are installed, enabled and started successfully; all appears to be in order. Issue seems to be either configuration related or possibly some bug. Im not sure what the configuration should be and i dont see an example anywhere, only i can reference what the xrdp.ini is from the debian repo as pulled from another workstation running the old version that actually works.
Have you now got a log in /var/log/xrdp-sesman.log?
[20220815-11:44:24] [INFO ] Received request to create Xorg session for user: user
[20220815-11:44:24] [INFO ] Terminal Server Users group is disabled, allowing authentication
[20220815-11:44:24] [INFO ] ++ created session (access granted): username user, ip 10.21.83.2
[20220815-11:44:24] [INFO ] Starting session: session_pid 1196, display :10.0, width 1546, height 908, bpp 24, client ip 10.21.83.2, user name user
[20220815-11:44:24] [INFO ] [session start] (display 10): calling auth_start_session from pid 1196
[20220815-11:44:24] [INFO ] Starting X server on display 10: Xorg :10 -auth .Xauthority -config xrdp/xorg.conf -noreset -nolisten tcp -logfile .xorgxrdp.%s.log
[20220815-11:44:33] [WARN ] Timed out waiting for X server on display 10 to startup
[20220815-11:44:33] [INFO ] Starting the xrdp channel server for display 10
[20220815-11:44:33] [INFO ] Session started successfully for user user on display 10
[20220815-11:44:33] [INFO ] Session in progress on display 10, waiting until the window manager (pid 1197) exits to end the session
[20220815-11:44:34] [WARN ] Timed out waiting for X server on display 10 to startup
[20220815-11:44:34] [ERROR] There is no X server active on display 10
[20220815-11:44:34] [ERROR] A fatal error has occured attempting to start the window manager on display 10, aborting connection
[20220815-11:44:34] [WARN ] Window manager (pid 1197, display 10) exited quickly (1 secs). This could indicate a window manager config problem
[20220815-11:44:34] [INFO ] Calling auth_stop_session and auth_end from pid 1196
[20220815-11:44:34] [INFO ] Terminating X server (pid 1198) on display 10
[20220815-11:44:34] [INFO ] Terminating the xrdp channel server (pid 1201) on display 10
[20220815-11:44:34] [INFO ] X server on display 10 (pid 1198) returned exit code 1 and signal number 0
[20220815-11:44:34] [INFO ] xrdp channel server for display 10 (pid 1201) exit code 0 and signal number 0
[20220815-11:44:34] [INFO ] cleanup_sockets:
[20220815-11:44:34] [INFO ] Process 1196 has exited
[20220815-11:44:34] [INFO ] ++ terminated session: username user, display :10.0, session_pid 1196, ip 10.21.83.2
Ok finally got it to work. I think what made it work was installing the package xorgxrdp and also changing "allowed_users" from "console" to "anybody" setting in /etc/X11/Xwrapper.config file. One machine did require a reboot before working, probably due to removing repo version that was previously installed.
Darren I've had great luck using xRDP install script from c-energys:
https://c-nergy.be/blog/?cat=79
Their script supports Debian & Ubuntu.
You might try it in a Debian VM.
Note the 3 optional Command line options.
Brian
On Mon, Aug 15, 2022, 7:08 AM Daren Lee @.***> wrote:
Ok finally got it to work. I think what made it work was installing the package xorgxrdp and also changing "allowed_users" from "console" to "anybody" setting in /etc/X11/Xwrapper.config file. One machine did require a reboot before working, probably due to removing repo version being previously installed.
— Reply to this email directly, view it on GitHub https://github.com/neutrinolabs/xrdp/issues/2332#issuecomment-1214893643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM23J4PBLYF3D2NPABU7VTVZIQLTANCNFSM55RZVKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Nice Brian, I will definitely check that out and thanks for the share. I am extremely pleased to finally have auto resizing in Debian.
C-energys builds everything with latest xRDP sources
On Mon, Aug 15, 2022, 8:04 AM Daren Lee @.***> wrote:
Nice Brian, I will definitely check that out and thanks for the share. I am extremely pleased to finally have auto resizing in Debian.
— Reply to this email directly, view it on GitHub https://github.com/neutrinolabs/xrdp/issues/2332#issuecomment-1214935984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM23JZ57OC2QHWVLGOQEL3VZIW3JANCNFSM55RZVKOA . You are receiving this because you commented.Message ID: @.***>
If anyone is interested this installs the latest xrdp on Debian 11. It installs necessary packages, downloads the latest get, compiles and sets xrdp to accept connections only from SSH connection (127.0.0,1) and doesnt require a reboot, it should just work after commands complete. I can't think of many scenarios where you could safely use xrdp without an SSH tunnel so...
sudo apt-get install -y xorgxrdp libpam0g-dev libx11-dev libxfixes-dev libxrandr-dev nasm autoconf libtool git libssl-dev bash-completion
sudo sed 's`allowed_users=console`allowed_users=anybody`' /etc/X11/Xwrapper.config >tmp
sudo mv tmp /etc/X11/Xwrapper.config
mkdir ~/apps
cd ~/apps
git clone https://github.com/neutrinolabs/xrdp
cd ~/apps/xrdp
./bootstrap
./configure
make
sudo make install
sudo sed 's`port=3389`port=tcp://127.0.0.1:3389`' /etc/xrdp/xrdp.ini >tmp
sudo mv tmp /etc/xrdp/xrdp.ini
sudo systemctl enable --now xrdp xrdp-sesman