Coder Social home page Coder Social logo

ishwarjagdale / wslwithgui Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 0.0 23 KB

This is a detailed tutorial on How to install and use Ubuntu Gnome Desktop on Windows Subsystem Linux 2 using XRDP service.

Home Page: https://ishwarjagdale.github.io/wslWithGUI/

linux-subsystem xrdp wsl ubuntu linux-installations

wslwithgui's Introduction

wslWithGUI


Run Ubuntu Desktop GUI on Windows Subsystem Linux 2 on Windows 10

Step 1: Activate Windows Subsystem Linux Feature

Open Powershell or CMD as administrator:

  • Enable WSL Feature
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  • Enable Virtualization
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Restart your device if needed, and make sure virtualization is enabled from bios


Step 2: Update to Windows Subsystem Linux

Download WSL2 Update Package: Download Package

Now Set WSL default to version 2 using the following command In CMD or Powershell

wsl --set-default-version 2

If you have already installed linux, update its version by:

wsl --set-version <linuxName> 2

Now, if everything done correctly wsl will be updated and set default for linux installations


Step 3: Install Ubuntu

Download the LTS version of Ubuntu from the Microsoft Store : Link

After downloading, open the Ubuntu app it'll install the linux subsystem. Follow the instructions and enter your unix username and password, when the linux is setup install the updates the system.

sudo apt update && sudo apt upgrade

Step 4: Install xrdp service and Ubuntu Gnome Desktop

We'll be using the Remote Desktop Protocol to connect to the display

sudo apt install xrdp ubuntu-gnome-desktop

During installation if prompted to configure display manager, select gdm


Step 5: Configure XRDP

  • Take a backup of the xrdp first
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
  • Change the default rdp port to 3390 (optional)
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
  • Change the resolution for better quality (optional)

The rdp connection will be local so why not better image quality

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
  • Edit the xrdp window manager
sudo nano /etc/xrdp/startwm.sh

After opening the file go to the end of the file and comment out the last two lines like this and gnome-session under it.

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

Step 6: Install the ubuntu-systemd script

Clone the git repo given below and run it Link to Repo

git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
cd ubuntu-wsl2-systemd-script/
bash ubuntu-wsl2-systemd-script.sh
# Enter your password and wait until the script has finished

After that exit the shell using exit command, and restart the wsl using

wsl --shutdown

then

wsl

in CMD or PowerShell


Done!!

Now run the xrdp service using (in shell)

sudo /etc/init.d/xrdp start

Open Windows Remote Desktop Service

search for rdp in start menu

Use Computer as : localhost:3390 or localhost:3389 if you didn't change the port.

Then click Connect

You'll be asked for the unix username and password and keep the session type to xorg


That's it. Thank you for reading!

wslwithgui's People

Contributors

ishwarjagdale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wslwithgui's Issues

Fix README

minor fix needed in the README.

Change Step #3 from,

sudo apt install update && sudo apt upgrade

to

sudo apt update && sudo apt upgrade

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.