AI Engineer, DevOps Engineer, Industrial Engineer, Network Administrator, System Administrator, Cyber Security Analyst, Full Stack Developer, Software Translator, IT Auditor and IT Manager.
I was stuck on this for the longest time. After starting the RDP session I would just be return to the intital RDP screen after entering my credentials. I could not find the startwm.sh file, so I kept looking. All troubleshooting paths kept pointing to this solution. Finally I found the hint hidden in log files. On my Fedora system this file is located at: /usr/libexec/xrdp/startwm.sh. Once I had the right file I could comment out # . /etc/X11/xinit/Xsession and add: # xfce
startxfce4
Then everything was fine. Thanks so 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
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.
AI Engineer, DevOps Engineer, Industrial Engineer, Network Administrator, System Administrator, Cyber Security Analyst, Full Stack Developer, Software Translator, IT Auditor and IT Manager.
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.
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/Xsessionadd these lines:
# xfcestartxfce4
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.
I was stuck on this for the longest time. After starting the RDP session I would just be return to the intital RDP screen after entering my credentials. I could not find the startwm.sh file, so I kept looking. All troubleshooting paths kept pointing to this solution. Finally I found the hint hidden in log files. On my Fedora system this file is located at:
/usr/libexec/xrdp/startwm.sh. Once I had the right file I could comment out# . /etc/X11/xinit/Xsessionand add:# xfcestartxfce4
Then everything was fine. Thanks so 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