You have probably heard of Windows Subsystem for Linux or WSL, this is a feature that you can enable in Windows 10 to natively run Linux command, and application on your Windows machine without running in a separate virtual machine.
Microsoft made a couple of Linux distributions available to name a few
and more, just search for Linux in the Microsoft public Store
I choose to install openSUSE, and wanted to see if it was possible to run a desktop environment as well.
There is a free and open-source desktop environment for Linux and Unix called Xfce, if you heard of GNOME it is similar to this (but Xfce is not GNOME fork)
How do you get all this going then? Well first enable Windows Subsystem for Linux
Choose to install you favorite Linux distribution from Microsoft Store, my choice this time is ubuntu, but I have tested the same with Kali Linux.
What for the installation and launch the Linux prompt, search for ubuntu in the start menu.
First make sure to update your Linux installation, with these commands
sudo apt-get update
sudo apt-get dist-upgrade
Now time to install wget to download Xfce, may not be needed on some distributions
sudo apt-get install wget
Now time to download and install Xfce, goodies (optional), and start the service
sudo apt-get install xfce4
sudo apt-get install xfce4-goodies
sudo apt-get install xrdp
sudo sed -i ‘s/port=3389/port=3390/g’ /etc/xrdp/xrdp.ini
sudo service xrdp start
If you are running For Kali Linux, these are the commands
chmod +x xfce4.sh
sudo ./xfce4.sh
sudo /etc/init.d/xrdp start
OK done! How do you connect to the Linux desktop? Run Remote Desktop Connection, mstsc.exe
Enter the Computer: 127.0.0.1:8890, press Connect
What is your best tips with Linux on Windows 10? Share it in the comments, and Have fun!
Actually, I would enter localhost instead of 127.0.0.1:8890 becuase 127.0.0.1:8890 just didn’t work for me. I like this because it is basically a nice little dual-boot but without the chaos of dual-booting or the risks. Just one problem, xfce’s web browser didn’t open due to an Input/Output error.
LikeLiked by 1 person
Hi!
I would like to ask you..
How to go back to Windows 10..
Thank you!
LikeLike
what session did you choose on login screen?
LikeLike
Great work !
You’ve just made a little error in your tuto :
You said “Enter the Computer: 127.0.0.1:8890, press Connect” but, as shown in your picture, we actually have to enter 127.0.01.3390
If some of you are interrested, I’ve made a tuto to make a one click Xubuntu desktop launcher from Windows based on your solution :
LikeLiked by 2 people
Its not working for me.. sudo sed -i ‘s/port=3389/port=3390/g’ /etc/xrdp/xrdp.ini command isn’t working for me. and shows error while connecting remote desktop/
LikeLike
me too. i’m new to this and the faulty script has had me running around the web for hours! i know this guy does this for nothing and i appreciate that but i need help! please???
LikeLike
The single quote is wrong.. please manually replace this
LikeLike
How could we run GNOME instead of XFCE4 desktop ?
LikeLike
sure, why not, I haven’t tested it myself, but se no reason why it shouldn’t work
LikeLike
It works perfectly !
It’s the only solution that worked to get a graphical desktop with WSL on my laptop.
Why do you have to change the TCP port ? (sudo sed -i ‘s/port=3389/port=3390/g’ /etc/xrdp/xrdp.ini)
Thanks a lot !
LikeLike
sudo sed -i ‘s/port=3389/port=3390/g’ /etc/xrdp/xrdp.ini
This line didn’t work it says:
sed: -e expression #1, char 1: unknown command: `’
LikeLike
I did a copy/paste and had same issue. Fixed it by overtyping the ‘ (single quotes). Looks like copy/paste copied it as a different character
LikeLiked by 1 person
Very good sharing
LikeLiked by 1 person