Hello, I followed the instructions for other debian based distros because I am using Ubuntu 18.04 on WSL 2. I am able to get to the Xrdp login in page; however, as soon as I type in my WSL credentials it closes out back to the RDP window.
Started coding at the age of 13, now a professional software engineer and Scrum Master, creating and maintaining enterprise solutions. Eat - Sleep - Code - Lift - Repeat 💪🏾
Can you open a wsl command line end check the logs right after this happens?
I'd check at least those logs: tail -n 100 /var/log/syslog tail -n 100 /var/log/xrdp-sesman.log tail -n 100 var/log/sesman.log
Started coding at the age of 13, now a professional software engineer and Scrum Master, creating and maintaining enterprise solutions. Eat - Sleep - Code - Lift - Repeat 💪🏾
Started coding at the age of 13, now a professional software engineer and Scrum Master, creating and maintaining enterprise solutions. Eat - Sleep - Code - Lift - Repeat 💪🏾
Superb, thanks! Editing the startwm.sh file solves the problem of closing the rdp session after entering the login credentials.
FYI: It only works on Ubuntu 20.04, Ubuntu 18 wouldn't work for me
Worked with Microsoft operating systems for all my professional life. Since Windows 10 is allowing to host Ubuntu using a full kernel, I wish to learn Linux.
Hi,
First I followed original instructions, but after connecting over RDP and entering login credentials, it was closing the RDP session immediately.
Then I run all commands from Ridwan's post, and now it works well!
Thank you Robin and Ridwan!
PS: I have Ubuntu 20.04 installed in WSL 2.
Started coding at the age of 13, now a professional software engineer and Scrum Master, creating and maintaining enterprise solutions. Eat - Sleep - Code - Lift - Repeat 💪🏾
I have run Ubuntu with xfce on WSL1 using VcXsrv, but can't use the browser. I tried to update Windows to be able to try WSL2, it turns out that xfce could not run due to display problems. Finally here I found the solution by Ridwan, of courser Robin also who made the tutorial thread, as well as other commentators. Thanks.
Hello, I followed the instructions for other debian based distros because I am using Ubuntu 18.04 on WSL 2. I am able to get to the Xrdp login in page; however, as soon as I type in my WSL credentials it closes out back to the RDP window.
Can you open a wsl command line end check the logs right after this happens?
I'd check at least those logs:
tail -n 100 /var/log/syslog
tail -n 100 /var/log/xrdp-sesman.log
tail -n 100 var/log/sesman.log
I have the same issue.
/var/log/syslog
and/var/log/sesman.log
don't exist for me, but/var/log/xrdp-sesman.log
contains the following:I'm not entirely sure what's going on here. Any ideas?
Sorry no idea just from the logs.
Can you please post the content of your
xorg.conf
file?Maybe this gives a hint.
Sure, here it is:
You could start analyzing it by checking the logs. Open your wsdl env in powershell and check logs located at
/var/log
for clues.In Ubuntu WSL:
sudo apt-get purge xrdp
then
sudo apt-get install xrdp
sudo apt-get install xfce4
sudo apt-get install xfce4-goodies
configure :
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
echo xfce4-session > ~/.xsession
sudo nano /etc/xrdp/startwm.sh
comment these lines to:
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
add these lines:
# xfce
startxfce4
sudo /etc/init.d/xrdp start
Now in Windows, use Remote Desktop Connection
localhost:3390
then login with Xorg, fill in your username and password.
Those instructions did the trick for me. :)
Thank you very much.
Superb, thanks! Editing the startwm.sh file solves the problem of closing the rdp session after entering the login credentials.
FYI: It only works on Ubuntu 20.04, Ubuntu 18 wouldn't work for me
Thank-you. Worked perfectly. :-)
Thaaaanks! It Worked
I just change the port to 3400 i hope it dont effect the server but this error is coming up. Any recommendations?
which error?
Hi,
First I followed original instructions, but after connecting over RDP and entering login credentials, it was closing the RDP session immediately.
Then I run all commands from Ridwan's post, and now it works well!
Thank you Robin and Ridwan!
PS: I have Ubuntu 20.04 installed in WSL 2.
It seems like newer versions of wsl are having this behavior, good that Ridwan shared his solution and you got it working with it 😊
I have run Ubuntu with xfce on WSL1 using VcXsrv, but can't use the browser. I tried to update Windows to be able to try WSL2, it turns out that xfce could not run due to display problems. Finally here I found the solution by Ridwan, of courser Robin also who made the tutorial thread, as well as other commentators. Thanks.
Thanks, @rescenic ! I had the same problem, you solution works