Skip to content

Instantly share code, notes, and snippets.

@goyuninfo
Created February 24, 2021 00:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save goyuninfo/5fa578c92e98e39939b6f6bd939e45c5 to your computer and use it in GitHub Desktop.
Save goyuninfo/5fa578c92e98e39939b6f6bd939e45c5 to your computer and use it in GitHub Desktop.
Install xfce on WSL2 Ubuntu
sudo apt update && sudo apt -y upgrade
sudo apt-get purge xrdp
# install xfce
sudo apt-get install -y xfce4 xfce4-goodies
# install xrdp
sudo apt-get install xrdp
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
#enable dbus
sudo systemctl enable dbus
sudo /etc/init.d/dbus start
sudo /etc/init.d/xrdp start
# check xrdp status
sudo /etc/init.d/xrdp status
@danielholtnl
Copy link

danielholtnl commented Mar 15, 2022

Thanks! What worked for me was first of all upgrade wsl2 Debian to bullseye and adding the following between line 12-13:

# install dbus
sudo apt-get install dbus-x11
sudo service dbus start
# because while starting xrdp I got the error 'Failed to execute child process 'dbus-launch'':
# export the correct DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID
export $(dbus-launch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment