Running WSL GUI Apps on Windows 10

Published 06-27-2020 09:12 AM 252K Views





In this post I will demonstrate how to run Linux GUI (Graphical User Interface) applications on Windows Desktop platform.


For now, it is necessary to install a third-party App to run the GUI Apps, but Microsoft announced on //build 2020 that they will release soon an improvement that will not require any third-party component to run Linux GUI Apps on Windows Desktop.



  • Windows 10
  • WSL


If you want to know how to install WSL on Windows 10, please check the following post:



logo.pngUsing WSL2 in a Docker Linux container on Windows to run a Minecraft Java Server



It will be demonstrated the three ways to run the Linux GUI Apps on Windows 10 through:

  • VcXsrv Windows X Server (free)
  • X410 App available on Microsoft Store (paid app)
  • Kali App available on Microsoft Store (free)


First option: VcXsrv Windows X Server

The X server is a provider of graphics resources and keyboard/mouse events. I am using the VcXsrv Windows X Server that is open-source and is frequently update.


The first step is to install the third-part display manager called VcXsrv Windows X Server available at:


During setup is important to disable the access control to avoid the permission denied error when trying to run a GUI application:


VcXsrv disable access control 2.png



To warranty that the “Disable access control” will be always checked, save the configuration and always launch VcXsrv using the configuration file (config.xlaunch) :


VcXsrv disable access control.png



NOTE: Don't forget to allow VcXsrv in the Windows firewall settings.


Windows Security -> Firewall & network protection -> Allow an app through firewall -> make sure VcXsrv has both public and private checked.





The next step is to set the DISPLAY environment variable on Linux to use the Windows host's IP address as WSL2 and the Windows host are not in the same network device. It is necessary to set the DISPLAY environment variable with the correct IP address on launch. There are different ways to set the DISPLAY variable, thank you @ZeevS and @Barry_Bazza for the updates.


Follows some ways that you can choose:


export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"

export DISPLAY="`sed -n 's/nameserver //p' /etc/resolv.conf`:0"

export DISPLAY=$(ip route|awk '/^default/{print $3}'):0.0



Running the following command, it is possible to see that the $DISPLAY environment variable now has the Windows Host’s IP set:









To avoid having to run that command every time that WSL is launched, you can include the command at the end of the /etc/bash.bashrc file:


export display.png



UPDATE: I would like to thank @samuel_skeen for let me know that now it is also necessary to create a .xsession file in the user's home directory (/home/<user>/.xsession) with the content xfce4-session:



echo xfce4-session > ~/.xsession



Done! Now you can run the Linux GUI Apps on Windows desktop.


Let’s try this out!


Follows some Apps that you can use to test:


Install Chromium Dev :


sudo add-apt-repository ppa:saiarcot895/chromium-dev
sudo apt-get update
sudo apt-get install chromium-browser



Install GEDIT:


sudo apt install gedit



Install x11-apps:


sudo apt install x11-apps




Make sure that XLaunch is running and before calling the Linux GUI Apps on Windows Desktop environment.


apps running.png


run gui apps wsl.gif



What about running Windows 10 Apps and Linux GUI Apps in the same Desktop?


Run the following command to launch the xfce-panel:


xfsettingsd --sm-client-disable; xfce4-panel --sm-client-disable --disable-wm-check &




What about accessing the Linux Desktop Environment via RDP?


The first thing that you need to do is to install a Linux Desktop Environment. I will user Xfce as it is a lightweight one.


Run the following commands to install Xfce:


sudo apt install xfce4



The next step is to install the xrdp that provides a graphical login to remote machines using RDP (Microsoft Remote Desktop Protocol).


sudo apt install xrdp



Type the following command to get the WSL IP address:


ip a



ip addr.png


Make sure that xrdp service is running:


start xrdp.png


Run the Remote Desktop Client (MSTSC) and type the WSL IP address to connect to xfce4:






Done! Now you can access your favorite Linux IDE on WSL.



wsl rdp.png


wsl rdp 3.gif



Second option: X410 App

The app is available on Microsoft Store:




In the image below I am using the the X Server X410 App available in the Windows 10 store, that has a better graphic performance:





Enabling Sound

X410 X Server App, as well as XLaunch, supports sound on Ubuntu (18;04 and 20.04). If you are using X410, please following the steps available at:


I only had to change the third step to use auth-anonymous instead of the auth-ip-acl:

load-module module-native-protocol-tcp auth-anonymous=1


More details here:


I defined the PULSE_SERVER environment variable too, as:


export PULSE_SERVER=tcp:$(grep nameserver /etc/resolv.conf | awk '{print $2}')



Thank you @Barry_Bazza, for letting me know that the following Pulse Audio version also works: pulseaudio-5.0-rev 18 .


This is the code bat file that I am using to load X410:


@echo off
start /B x410.exe /wm
start "" /B "C:\wsl\pulseaudio\bin\pulseaudio.exe"

ubuntu2004.exe run "if [ -z $(pidof xfce4-panel) ]; then export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0;export PULSE_SERVER=tcp:$(grep nameserver /etc/resolv.conf | awk '{print $2}'):0;  cd ~; xfsettingsd --sm-client-disable; xfce4-panel --sm-client-disable --disable-wm-check; taskkill.exe /IM x410.exe;taskkill.exe /IM pulseaudio.exe /F; fi;"



For more details about how to enable the xfce-panel steps, please check: 


Follows a great thread about how to fix sound issues:


No sound in wsl2 · Issue #4205 · microsoft/WSL (


Third option: Kali App

Kali Linux Windows Application is available on Microsoft Store:


Once installed, after having providing the credentials, run the following command to install Win-KeX to allow running GUI Linux Apps on KALI for Windows:


sudo apt update && sudo apt install kali-win-kex



Run the following command to run Kali:


kex wstart




kex wstart.png


The KALI environment will be loaded:




With Kali, you don't have to worry about setting environment variables or starting services.


Follows the Kali page with more details:

Kali Linux in the Windows App Store | Kali Linux

Win-KeX Version 2.0 | Kali Linux


In this post we see how to run GUI Linux Apps using XServer on Windows Desktop environment and how to access the full WSL Linux desktop environment.


I hope you liked!




I encountered an error after referencing this article.


(gedit:10261): Gtk-WARNING **: 15:32:39.217: cannot open display:


Thank you for the feedback Fan Su.

If you are using both the approaches described here, i.e., using XServer and xfce4, probably gedit is already opened in the xfce4. Please switch to xfce4 and close the opened Apps or do a sign out to close the Apps. Please let me know if it helped. 

Valued Contributor

When I saw the first picture, I thought it is Windows NT or older version of Windows.

I believe know, Linux users could just work inside Windows.

However, be very careful about security because in this case vulnerabilities in Linux could affect Windows , so be careful and make sure you always have the latest update.


Thank you @luisdem .I  have tried to access via xrdp but log in with an account password and automatically exit.I  think I gave up.


@Fan Su please don't hesitate to send me a step-by-step so I can try to help you. :)

I faced this once, but for me this happened because I forgot some Apps opened in the xrdp session. :(

By your error message, I am assuming that the $DISPLAY environment variable is correctly set, as it has a value. Other thing that you could try to do, is to restart the XLauncher App.


I hope that it helps!

Best Regards! Luis


@luisdem , Thank you a lot. I've reinstalled the VcXsrv and it's working now. But there are still some minor problems, such as network access failures



However, RDP login still has a problem, enter the account password will be ejected and no error message.

Occasional Visitor

How do I configure this if I've done the tweak to configure bridge mode in WSL 2? The value returned from my /etc/resolv.conf is no longer auto generated by WSL and instead set to run directly off my network. Using localhost or the LAN IP of my host windows for the DISPLAY value has not worked.


EDIT: Scratch that, after creating this sacrificial post to guarantee my next attempt's success, using the LAN IP (with just :0 at the end instead of :0.0) and disabling access control makes it work!



I'm trying to run GUI applications on my WSL terminal but I get this error: Error: Can't open display:

I noticed someone else was having the same issue, I tried reinstalling VcXrsv, but I still get the same error. 


I am running Windows 10 version 2004 (OS Build 19041.388)

Ubuntu 20.04
WSL Version 2 

Step by Step of What I'm doing:

  1. Launching VcXrsv
    1. Selecting Multiple Windows
    2. Setting Display number to -1 
    3. Press Next
    4. Selecting "Start no client"
    5. Press Next
    6. Checking "Disable access control"
    7. Press Next
    8. Press Finish
  2. Opening Ubuntu
    1. Run Command: export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"
    2. Run Command: echo $DISPLAY
      1. Ubuntu Terminal Outputs:
    3. Run Command: xeyes 
      1. I get the error:  Error: Can't open display:


UPDATE: Just fixed it. I went into Windows Firewall and gave VcXrsv an exception to both public and private networks. Thank you for writing this tutorial @luisdem !!!



Thank you very much @akamal816 for your feedbacks and the detailed information! I am really glad that you made it work! I will update the post with this information. Thanks!

Occasional Visitor

I've followed all of the steps as @akamal816 , including adding firewall exceptions, but am still running into `Error: Can't open display:`. I have confirmed that VcXsrv is running and working enough to start xcalc from the windows tray menu.


* I've confirmed in ipconfig that this is the correct IP address for WSL.

* I've tried completely disabling my firewall in case the rules were off.

* I've tried a handful of other configurations of VcXsrv, including adding the -ac option I've seen suggested in other locations.

* I've tried reinstalling VcXsrv.
* I've tried rebooting WSL. I'm trying to avoid wiping & reinstalling.
* I've tried rebooting.


I do not have a deep enough understanding of these tools to diagnose which pieces are/aren't working.


Hi @kmacdough , based on your message error, I think that the $DISPLAY variable is successfully set, as I can see the IP in the message and as it worked for the xcalc App.


But only to double-check it, please let me know if the value is different of null.


In case the $DISPLAY variable is correctly set, probably the Linux Desktop environment session is opened (in my case xrdp), in case you have installed and accessed it.


To double-check it, you need to connect to the Linux Desktop environment using the WSL IP address and MSTSC (remote desktop) and sign out:


ip a


Copy the WSL IP address and run the MSTSC (remote desktop) to access the Linux GUI environment.


Please let me know if it helps.



Occasional Visitor

@luisdemI've never set this up, but I'm attempting anyways just in case. Running ip a from within WSL, I see an inet address for eth0. Is this the one you're referring to? If so, MSTSC was unable to connect.

Occasional Visitor

To clarify, xcalc only works when run directly from VcXsrv menu in windows tray, not when run from WSL prompt. I am currently using ConEmu if that's relevant.


Also, to be clear:

....$ echo $DISPLAY

@kmacdough , thank you for the detailed info.

So, does it not work when you access from WT, like this?



Notice that XLaunch must be running.



@kmacdough , follows the IP that I am using on MSTSC:




Occasional Visitor

@luisdemI've figured it out. xrdp was not the issue. The initial post I referred to used " /sbin/ip route" which gives a different IP :facepalm:. Updating the .bashrc & re-sourcing fixed the problem. I'm a dummie. Thanks!


EDIT: My real mistake was not finding this post to start with :)


@kmacdough , I am really glad that it works!!!!!! :)

Occasional Visitor

Just to save time on googling to other Ubuntu newbies like me: I had only terminal with no GUI originally.

The following command adds the required 'export DISPLAY' command to the end of bash.bashrc file. Note that I had to switch to super user (root), because of the 'permission denied' error for my regular user (student):

student@GARAVSKY-NB-W10:~$ sudo -s
[sudo] password for student: 
root@GARAVSKY-NB-W10:/home/student# echo $'export DISPLAY=\"`grep nameserver /etc/resolv.conf | sed \'s/nameserver //\'`:0\"' >> /etc/bash.bashrc

You can make sure that the line is correctly added using the following command:

cat /etc/bash.bashrc 

If you added a wrong line, the following command removes the last line from this file:

sed -i '$ d' /etc/bash.bashrc

Finally, you can return back to regular user (student) with the following command:

sudo -u student -s

Finally, when you ran these commands, start "c:\Program Files\VcXsrv\xlaunch.exe"  from the location where you installed it. This will help you configure the X server as shown in the first screenshots - it was not clear to me from the beginning of this article (probably it should be mentioned explicitly).

Then I saved the configuration to "c:\Program Files\VcXsrv\config.xlaunch"  and started it. If this happens to you too, look for the app icon in the system tray (right bottom of the taskbar).


Adding this comment here to help those who had the error 


Error: Can't open display:

(which is my IP address) or maybe ones who had multiple IP Addresses shown when you check the $DISPLAY variable.


Right click on the VcXsrv icon in the taskbar and click on Show log.



In the notepad that opens, look for the line 

winClipboardThreadProc - DISPLAY =

Dunno if that IP Address will be different for others, but yes, copy that. Don't copy the port number. In this case 


Now in you WSL Terminal, type

sudo nano /etc/resolv.conf

In the text editor that opens, delete whatever appears after 'nameserver' and paste the above IP Address. Press Ctrl+O, Enter, and Ctrl+X to save and close the editor.


Then type, 

export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"

and proceed as per the tutorial. This is what I did when I was stuck. Hope it works.




Thank you for this very detailed tutorial! Unfortunately, I am having trouble getting this to work despite following all the steps here. echo $DISPLAYNAME shows "" (numbers masked), and I've launched VcXsrv with the Disable Access Control box checked and after having enabled both public and private connections in the Firewall app (which I did not do when initially installing and launching VcXsrv). I tried launching it with both display port -1 and 0, but in all cases trying to launch xcalc from the Ubuntu terminal results in the error


Error: Can't open display:


I installed xrdp and attempted to connect to the IP address from "ip a", ", in the same /16 as the previous address, but after entering my username and password it exits abruptly.


Oh, I figured this out just a bit after my post. Even though I went back into Windows Defender in the suggested path

Windows Security -> Firewall & network protection -> Allow an app through firewall -> make sure VcXsrv has both public and private checked.


and selected public (which I'd omitted on the original pop-up screen), and hit OK, this didn't seem to take. I went into the advanced Firewall settings and deleted all the inbound rules for VcXsrv. This made the defender popup box appear again, I selected private and public, and now everything works great.


@jwimberl, I am glad that it worked!!!!! Thank you very much for your feedback!!!! :)


@sudevssuresh , thank you very much for sharing more details!!!!! :)


@luisdem you are my man of the hour! I was just looking for someway to make this happen.

Would you know if Plasma or LXQT will also work via this method. I plan on trying one this weekend.

EDIT: spoke too soon. I am having issues rdping to to wsl.


I have installed xfce and slim and started the slim service.

I also have vcxsrvr running. I am able to render xeyes on my windows desktop without issues.


but when I try to rdp into wsl, i get the xorg login screen;


And when I login, I get this error





Hi @rishavsharan , thank you very much for your feedback! :)


I am facing the same issue in a machine with Ubuntu 20.04. What Ubuntu version are you using?


On Windows 10, it is possible to have more than one Linux distro installed. I have both 18.0 an 20.4 installed:




You need to stop the xrdp service on Ubuntu 20.04:


sudo service xrdp stop

And start the same on 18.04 :


sudo service xrdp start

It worked after that.


Please let me know if it is your same scenario.









Hey @luisdem I am indeed on Ubuntu 20.04.1 LTS

I will give 18.0 a try and report back with my results.


On 18.0 I am able to get LXQT to work properly.  As long as my vcxsrv window is open, it works as the OS window.

All you need to do is install lxqt and sddm by


sudo apt install lxqt sddm


and then start the desktop manager using


sudo service sddm start


Sound is not working but it is something I will investigate.




@rishavsharan I am glad that you made it work!


Related to the sound issue, I only could make it work using the X410 X Server App and following the steps available at:


I had to change the third step to:


load-module module-native-protocol-tcp auth-anonymous=1


I defined the PULSE_SERVER environment variable too, as:


export PULSE_SERVER=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0;export PULSE_SERVER=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0


satya youtube.png


This is the code bat file that I am using to load X410


@echo off
start /B x410.exe /wm
start "" /B "C:\wsl\pulseaudio\bin\pulseaudio.exe"

ubuntu1804.exe run "if [ -z $(pidof xfce4-panel) ]; then export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0;export PULSE_SERVER=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0; cd ~; xfsettingsd --sm-client-disable; xfce4-panel --sm-client-disable --disable-wm-check; taskkill.exe /IM x410.exe;taskkill.exe /IM pulseaudio.exe /F; fi;"

I need to investigate how to make it work on XLaunch.



I am actually good without sound for now as I plan to use wsl mostly for dev work.

Just wanted to add one more way of running the desktop. You don't really need xrdp at all.


Here are all the steps for lxqt (and hopefully any other desktop)

  1. Open bash. do `sudo apt update` and then install lxqt `sudo apt install lxqt sddm`
  2. in bash type `export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"`
  3. open up vcxrv
  4. and then in the bash type `startlxqt` (or startxfce4). 

That alone should be able to start the desktop env in the vcxsrv.


I followed the steps outlined in the article, but I kept getting "Can't open display" messages.


Eventually I've figured out that there were 2 issues in my case:

  1. Grepping IP-address from resolv.conf did not work since nameserver address was different from my IP-address (I also had to manually fix the nameserver address in resolv.conf, since the auto-generated one did not work). I had to look up my actual IP-address by running `ipconfig` in PowerShell. Use the one associated with your machine (not the WSL one).

  2. The firewall settings described in the article were incomplete. I also had to click on "Public network" (which was active in my case) and uncheck "Block all incoming connections, including those in the list of allowed apps".


Maybe it's worth mentioning these options in the text.


Thank you @IgorGayday !!!!! :)

Occasional Visitor


当我运行 chrome 时,发现显示的文字乱码,报错信息如下,希望能提供一些帮助,谢谢

(base) hao@LAPTOP-0EJFF4VB:~$ google-chrome
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[35:90:0807/] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[35:104:0807/] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[35:104:0807/] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[99:99:0807/] Exiting GPU process due to errors during initialization
[35:104:0807/] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")




Thank you for the feedback @greedyhao !

Yes, the same happens here. Probably that will fixed in the version that Microsoft will implement the X Server feature.




Occasional Visitor

Im having problems with the step where we put the command at the end of /etc/bash.bashrc. I already put the command but when i try to run it its say "Error: Can't open display:" i really dont want to put this command everytime i have to run a GUI app. what can i do?Annotation 2020-08-19 235539.jpg

Occasional Visitor

Thanks @luisdem this post has been really helpful.

I have it all up and running, although the resolution in the linux windows is much less than the native windows. Is there a way of fixing this?

Regular Visitor

Thanks for the great article, but I am confused.   I do not understand how or why the following should work:


export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"


I have VcXxerv  and there are only two ip addresses by which I can get at it  one is  localhost and the other is the ip of my windows host machine NIC


Can someone please help me understand what is going on, thanks





Occasional Visitor

@steve_bovy I found that command didn't give me the right address, either.  Instead I ran "ipconfig" (in powershell or "command") and used second IPv4 address:



Windows IP Configuration

Ethernet adapter vEthernet (WSL):

IPv4 Address. . . . . . . . . . . :


Ethernet adapter Ethernet:

IPv4 Address. . . . . . . . . . . :    <------- use this one for DISPLAY


Hi @BartonBond, thank you for your great feedback!
X410 App has a better performance and graphics than VcXsrv, but it isn't 100% yet.

Microsoft is working in a X Server version that will have a great graphics support. :D

Regular Visitor

On the issue of getting the Windows Host IP-ADDRESS I would like to suggest using  "nslookup.exe"


Try this:  @homedesk:~$ nslookup.exe


Then This :  @homedesk:~$ nslookup.exe $HOSTNAME | grep Name
Name: homedesk.local.lan


Then This: 


export DISPLAY="`nslookup.exe $HOSTNAME | grep Name | sed -e 's/Name: //' -e 's/\r//'`:0"


And for  starting xrdp 


echo MYUSER |  sudo -S service xrdp start



Senior Member

Hi, I'm using Ubuntu 20.04 LTS, I have installed VcXsrv , xfce4 and xrdp.  The command "sudo startxfce4" start the GUI, but Remote Desktop doesn't work, it opens the window and shows Xorg as session type, I insert the login user name and password and then the window just close. Any help is appreciated.

Thanks, Marco


Hi @mrcgrg , please make sure that the xrdp service is running.


xrdp status start.png


@juancv3d ,


Please make sure that the DISPLAY environment has an IP:




In case it hasn't, please double check that the X Server App is running and that the firewall exception is set.

Occasional Visitor

Kudos for the excellent integration of WSL2 finally in the latest release version of Windows, leaving finally I can stop using Insider builds.

As a Linux software developer now experimenting with Windows development, I can't wait to see the Microsoft X-Server version being integrated as soon as possible as a Windows service and left to install third party applications and to support native Windows resolutions.

Regular Visitor

Good News !!!


New release  20H2   includes   wsl2  'localhost' fix 

Regular Visitor

WSL2  Wish-List Feature Fix ??  { I know this is not the correct forum for this request }

I am just sounding off :) 







Example of   problem   (Accessing  Windows Host X-Serv) 


The following will not work:   DISPLAY=HOSTNAME:0




Additional  wsl.conf   Network   Keywords  ??


Allow custom configuration of  HOSTNAME  file   so  that  WSL2 VM  machine network name is unique and different from windows

host machine name  (  I would prefer the default to be the linux distribution name )  this would of course impact the HOST file as well



Senior Member

Hi @luisdem , the xrdp is running but the login fails. I have tried this ( is the IP address of Ubuntu), but it doesn't  work


marco@DP5820:~$ export DISPLAY=
marco@DP5820:~$ sudo startxfce4
[sudo] password for marco:
/usr/bin/startxfce4: X server already running on display
xrdb: Connection refused
xrdb: Can't open display ''
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.


The Xorg.0.log file shows this error:


[ 4826.410] (EE) open /dev/fb0: No such file or directory
[ 4826.410] (EE) No devices detected.
[ 4826.410] (EE)
Fatal server error:
[ 4826.411] (EE) no screens found(EE)
[ 4826.411] (EE)
Please consult the The X.Org Foundation support
for help.
[ 4826.411] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 4826.411] (EE)
[ 4826.411] (EE) Server terminated with error (1). Closing log file.


Thanks, Marco

Senior Member

Hi @luisdem, the xrdp.log file shows that the connection is ok, but then just close the socket and disconnect:


[20200826-15:58:37] [DEBUG] xrdp_00000a3f_wm_login_mode_event_00000001
[20200826-15:58:37] [INFO ] Loading keymap file /etc/xrdp/km-00000410.ini
[20200826-15:58:37] [WARN ] local keymap file for 0x00000410 found and doesn't match built in keymap, using local keymap file
[20200826-15:58:44] [DEBUG] xrdp_wm_log_msg: connecting to sesman ip port 3350
[20200826-15:58:44] [INFO ] xrdp_wm_log_msg: sesman connect ok
[20200826-15:58:44] [DEBUG] xrdp_wm_log_msg: sending login info to session manager, please wait...
[20200826-15:58:44] [DEBUG] return value from xrdp_mm_connect 0
[20200826-15:58:44] [INFO ] xrdp_wm_log_msg: login successful for display 10
[20200826-15:58:44] [DEBUG] xrdp_wm_log_msg: started connecting
[20200826-15:58:44] [INFO ] lib_mod_log_peer: xrdp_pid=2623 connected to X11rdp_pid=2626 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff: client_port=58172
[20200826-15:58:44] [DEBUG] xrdp_wm_log_msg: connected ok
[20200826-15:58:45] [DEBUG] xrdp_mm_connect_chansrv: chansrv connect successful
[20200826-15:58:45] [DEBUG] Closed socket 17 (AF_INET6 ::1 port 39438)
[20200826-15:58:45] [DEBUG] Closed socket 11 (AF_INET6 ::ffff: port 3389)
[20200826-15:58:45] [DEBUG] xrdp_mm_module_cleanup
[20200826-15:58:45] [DEBUG] Closed socket 18 (AF_UNIX)
[20200826-15:58:45] [DEBUG] Closed socket 19 (AF_UNIX)


Thanks, Marco

Senior Member

Hi @luisdem, it seems that X is not running on display 10. Thanks, Marco

Senior Member

Hi @luisdem, I solved the problem modifying the file. I commented out this two lines:


#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession


and I added this line:



Now RDP connection work fine with xorg session type.

Thanks, Marco

Regular Visitor



I order for synaptic to update your system you must run  as root , but when I try to use synaptic with xrdp I get the following:


bovy@homedesk:~$ sudo synaptic
[sudo] password for bovy:
No protocol specified
Unable to init server: Could not connect: Connection refused
Failed to initialize GTK.

Probably you're running Synaptic on Wayland with root permission.
Please restart your session without Wayland, or run Synaptic without root permission



thx for this guide and your answers to comments. I also ran into problem with xrdp/remote desktop using Ubuntu20.4. I would get the Xorg login fine. then it would die with the following message. I switched to using Ubuntu18.4 as you said then it's fine.




Version history
Last update:
‎Jan 15 2021 03:49 PM
Updated by: