Skip to content

Instantly share code, notes, and snippets.

@vyach-vasiliev
Last active April 7, 2023 17:26
Show Gist options
  • Save vyach-vasiliev/150ae096aab78651d354b58802291287 to your computer and use it in GitHub Desktop.
Save vyach-vasiliev/150ae096aab78651d354b58802291287 to your computer and use it in GitHub Desktop.
X11 Desktop Environment under WSL (connect by RDP)

RUN X11 Desktop Environment under WSL (connect by RDP)

Instruciton for WSL dist: Ubuntu 20.04 LTS

Settings

install packages

sudo apt update && sudo apt -y upgrade
sudo apt-get install -y xfce4 xrdp
sudo nano /etc/xrdp/startwm.sh

replace last two line:

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

startxfce4

edit configs

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
sudo /etc/init.d/xrdp start

and restart xrdp

sudo service xrdp restart

then run RDP of WindowsOS and connect to localhost:3390

Delete xfce

sudo apt-get purge xfconf xfce4-utils xfwm4 xfce4-session xfdesktop4 exo-utils xfce4-panel xfce4-terminal  thunar

Help

Settings manual 11 Themes to Make Xfce Look Modern and Beautiful

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