Closed mahendra03 closed 2 years ago
Thanks.
Hi @matt335672 ,
When you say desktop installed ? can you confirm the name of software i have just installed xrdp only.
When i go to my home directory inside i can't see xsession-errors if I am doing something wrong or missing something?
To use xrdp you need a desktop installed, like GNOME or XFCE. You can' use xrdp on a pure server install, which is what you may have by the sound of it.
Installing a desktop will greatly increase the amount of software on your system if you haven't got one installed.
What do you get for the command dnf group list
?
If you already have a desktop installed, or directly installed a desktop environment, make sure that your remote sever is set to a multi-user target. I believe that xrdp needs to take control/launch it's own x-session, so if you already have your desktop environment running, this will fail.
Steps to fix:
Run these commands on the target system
sudo systemclt set-default multi-user.target
sudo reboot
Attempt to reconnect using your RD client
Thanks @GoofyAF - you're quite right. I don't think however we're at that stage yet.
Getting the same behavior. Can connect to RDP remote port and authenticate. Creds are good. But the sessions just closes immediately.
# lsb_release -a
Kali
Kali GNU/Linux Rolling
2022.2
kali-rolling
# systemctl get-default
graphical.target
set LogLevel debug
and restarted xrdp
I have the logs for that if needed.
Kali rolling has xfce4
by default.
I have one instance where it runs correctly and one instance where it doesn't. The instance with issues is a fresh install. They both have the same xrdp configuration. (i.e. default) They both show the following window manager information.
# wmctrl -m
Name: Xfwm4
Class: xfwm4
PID: 4476
Window manager's "showing the desktop" mode: N/A
The only noticeably difference Working:
xrdp 0.9.17
Compiled with OpenSSL 1.1.1o 3 May 2022
Not Working:
xrdp 0.9.19
Compiled with OpenSSL 3.0.3 3 May 2022
If the session is closing immediately, it's likely the /etc/xrdp/startwm.sh
script is not managing to start the session.
~/.xsession-errors
?~/.xsession
or ~/.Xsession
exist on either machine?I do not have ~/.xsession
or ~/.Xsession
I do have a ~/.xsession-errors
.
Problem seems to be that the X server is exiting unexpectedly, or maybe isn't starting:-
(xfwm4:3639): Gtk-WARNING **: 13:12:44.697: cannot open display: :10.0
/var/log/xrdp-sesman.log
?~/.xorgxrdp.10.log
?What are the contents of /var/log/xrdp-sesman.log? xrdp-sesman.log
Are you using the Xorg or the Xvnc backend? Xorg
If you're using Xorg, what is in ~/.xorgxrdp.10.log? xorgxrdp.10.log
I still can't see anything definitive in there.
Can you also provide the output of sudo journalctl -S -1m
straight after trying to log in? That provides a system log for the last minute.
I see lots of errors in here. journalctl.txt
Your desktop appears to be segfaulting:-
Jun 29 19:21:10 kali xrdp-sesman[1471]: [WARN ] Window manager (pid 1472, display 10) exited with non-zero exit code 255 and signal 11. This could indicate a window manager config problem
Jun 29 19:21:10 kali kernel: xfce4-session[1472]: segfault at 2c ip 0000562f16c5d620 sp 00007fff8bd88b78 error 4 in xfce4-session[562f16c48000+1c000]
Jun 29 19:21:10 kali kernel: Code: b7 fe ff 0f 1f 80 00 00 00 00 4c 89 e7 e8 f8 ed ff ff 85 c0 75 b5 48 83 c4 08 4c 89 e7 5d 41 5c e9 e5 f2 ff ff 0f 1f 44 00 00 <8b> 47 2c c3 66 66 2e 0f 1f 84 00 00 00 00 00 90 8b 47 28 c3 66 66
Jun 29 19:21:10 kali xrdp-sesman[1471]: [WARN ] Window manager (pid 1472, display 10) exited quickly (0 secs). This could indicate a window manager config problem
Two possibilities spring to mind:-
systemd --user
(nor can it be).xfce isn't fully installed. Does it work on the system console?
I'm not entirely sure what this means or how to test this?
you're logged in to another graphical session (e.g. on the console) as the same user. This isn't supported on systems using systemd --user (nor can it be).
I am logged into the GUI via kali, which was what I was trying to RPD in as. I tried RDP via user root and it works completely. This is acceptable to me, as this is a kali machine and I always open terminals up as root
. So I'm happy, but I'm willing to continue troubleshooting if you wish. For instance I can try fully installing xfce; as I'm not sure if the kali maintainers are fully installing it.
Let me know how you'd like to proceed.
System console is the physical front end to the machine, if it's a physical machine (i.e. the keyboard, monitor and mouse connected to the machine). There's also a system console for a virtual machine, but it's generally harder to get to.
XFCE is working fine if it works OK on the system console. That's generally the easiest way to check XFCE is correctly installed.
You should be able to log in via XRDP to any user that isn't currently logged in to the system console.
Does that make sense?
Okay. I'm not sure I was aware of that.
I can login to XFCE4 via the system console. but I was trying the same user. Once I changed to login as kali
then xrdp as root
it worked.
Are you asking about logging into the console as kali
then trying to xrdp into localhost from the console session and rdp in as root
? If that's what you are asking I can try that?
I will also share the steps with you that i tried in my redhat golden image system to login to into remote desktop using xrdp
Sent from my iPhone
On 07-Jul-2022, at 9:00 PM, Tyler Bennett @.***> wrote:
Okay. I'm not sure I was aware of that.
I can login to XFCE4 via the system console. but I was trying the same user. Once I changed to login as kali then xrdp as root it worked.
Are you asking about logging into the console as kali then trying to xrdp into localhost from the console session and rdp in as root? If that's what you are asking I can try that?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
@tbennett6421 - suggest you sent up another unprivileged user for xrdp only. Then you can use kali or root on the console without having any difficulties.
No more ifno from poster(s) - closing.
What I would do in this case:
ssh remote -l userX 'pkill -U userX'
If you already have a desktop installed, or directly installed a desktop environment, make sure that your remote sever is set to a multi-user target. I believe that xrdp needs to take control/launch it's own x-session, so if you already have your desktop environment running, this will fail.
Steps to fix:
1. Run these commands on the target system
sudo systemclt set-default multi-user.target sudo reboot
2. Attempt to reconnect using your RD client
All you need is to log out and remain logged out to connect to your computer you don't need to change from grphical.target to multi-user.target
If you already have a desktop installed, or directly installed a desktop environment, make sure that your remote sever is set to a multi-user target. I believe that xrdp needs to take control/launch it's own x-session, so if you already have your desktop environment running, this will fail.
Steps to fix:
1. Run these commands on the target system
sudo systemclt set-default multi-user.target sudo reboot
2. Attempt to reconnect using your RD client
Typo should be: sudo systemctl set-default multi-user.target sudo reboot
If you already have a desktop installed, or directly installed a desktop environment, make sure that your remote sever is set to a multi-user target. I believe that xrdp needs to take control/launch it's own x-session, so if you already have your desktop environment running, this will fail.
Steps to fix:
- Run these commands on the target system
sudo systemclt set-default multi-user.target sudo reboot
- Attempt to reconnect using your RD client
This is worked for me for Fedora Workstation 41
I had a similar issue, that the XRDP session got closed immediately. The log looked similar to OPs. But the reason for me was that I have a script in /etc/profile.d/ which uses bash functions like shopt. The script /etc/xrdp/startwm.sh is a /bin/sh script which couldn't interpret those bash functions. After changing the first line in /etc/xrdp/startwm.sh
from #!/bin/sh
to #!/bin/bash
it worked. I found out by running the script /etc/xrdp/startwm.sh manually from cli.
Hi Team, I have xrdp installed in GCP instance for Redhat 8 system. when i checked the xrdp-sesman.log i can see below
I don't know why my system is getting close when im trying to login into instance xrdp 0.9.19 How I can get rid of this.