Skip to content

Instantly share code, notes, and snippets.

@CliffCrerar
Created June 4, 2023 14:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CliffCrerar/0db872734bd92b480164b116b2d1f383 to your computer and use it in GitHub Desktop.
Save CliffCrerar/0db872734bd92b480164b116b2d1f383 to your computer and use it in GitHub Desktop.
Install WSL with desktop GUI
# Requires WSL2 on windows
# Required windows config
# ---------------------------------
## in powershell run
# wsl --set-default-version 2
## to set wsl 2 as default
# ---------------------------------
## Then run
# wsl -l -v
## to see the versions installed
# ---------------------------------
## Then run
# wsl --set-version <Distro> 2
## To set the version
# ---------------------------------
# Then in execute this script
echo Update and Upgrade
sudo apt-get update && sudo apt-get -y upgrade
# Remove existing rdp
echo Remove existing rdp
sudo apt-get purge xrdp
# install xfce
echo install xfce
sudo apt-get install -y xfce4 xfce4-goodies
# install xrdp
sudo apt-get install xrdp
echo Add Start XFCE4
sudo echo Startxfce >> /etc/xrdp/startwm.sh
# following to set the port and other settings
echo No run the following to set the port and other settings
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.iniecho xfce4-session > ~/.xsession#enable dbus
sudo systemctl enable dbus
sudo /etc/init.d/dbus start
sudo /etc/init.d/xrdp start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment