7

I am running 18.04 LTS on Windows subsystem for Linux (WSL). I have installed the Ubuntu Desktop by running

sudo apt-get install ubuntu-desktop

However, when I start Linux only the terminal starts. How do I get the Desktop to start?

5

Windows 10 itself does not support GUI. In order to run GUI in wsl you need to install a X server and get it to configure correctly.

I would suggest you to install VcXsrv to display GUI.

I am not able to run GUI successfully by sudo apt-get install ubuntu-desktop. However, I successfully installed mate-desktop GUI in Debian and ubuntu.

Here are the steps for me to display GUI by wsl. You can check my videos on detailed steps Install GUI (mate desktop) to Microsoft Windows Subsystem Linux

step 1: install Debian or Ubuntu Linux subsystem: - PowerShell as administrator: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux - Microsoft Store: install "Debian" or "ubuntu"

step 2: install mate tesktop for Debian: - open Debian in windows 10. Type the following commend - sudo apt-get update - sudo apt install task-mate-desktop

OR install mate-desktop for Ubuntu - open Ubuntu console in windows 10 - sudo apt install tasksel - sudo apt update - sudo tasksel install ubuntu-mate-desktop

step 3: install VcXsrv in windows 10: - download from: https://sourceforge.net/projects/vcxsrv/ - open XLauch, and use the following options for setup - select: "One large window" - Display number: 0 - next - Start no client - next - finish

step 4: setup display in linux console: - export DISPLAY=:0 - export LIBGL_ALWAYS_INDIRECT=1

step 5: start Mate-desktop environment: - run mate-session

Step 3 and step 4 are extremely important to display GUI in windows 10 wsl.

| improve this answer | |
  • If you repost your answer on the duplicate candidate above your answer will help a larger audience. – WinEunuuchs2Unix Oct 16 '19 at 22:04
  • @WinEunuuchs2Unix Thanks. I will paste my solution to the duplicate candidate – David Xue Oct 17 '19 at 0:27
2

As great as WSL is, it's really not designed for that sort of thing.

If your goal is to get the full Ubuntu Desktop, it makes a lot more sense to just install a full Ubuntu Virtual Machine, using something like Virtualbox, Hyper-V, etc. Good luck!

| improve this answer | |
  • thanks, I solved my problem by partitioning my disk and installing a full Ubuntu 19.04 – cseligman Oct 12 '19 at 17:34
1

@gus33000 posted a working solution on Twitter:

https://twitter.com/gus33000/status/1188517307867381761

quick rundown for people wanting to recreate this:

Install VcXsrv

Install WSL

Install Ubuntu from the store

sudo apt-get upgrade

sudo apt-get install ubuntu-desktop

sudo service dbus start

sudo service x11-common start

gnome-shell --x11 -r

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.