Skip to content

Instantly share code, notes, and snippets.

@shakahl
Created April 13, 2020 16:15
Show Gist options
  • Save shakahl/f141d046f68a7a3af6cdc0f5e4e09675 to your computer and use it in GitHub Desktop.
Save shakahl/f141d046f68a7a3af6cdc0f5e4e09675 to your computer and use it in GitHub Desktop.
Install Ubuntu Desktop GUI on WSL

Install Ubuntu Desktop GUI on WSL

References

Installation

1. Preparations

  • Install VcXsrv in Windows 10
  • Install WSL Windows component from control panel
  • Install Ubuntu from Microsoft Store

2. WSL configuration

sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

3. Start X11 and DBUS

sudo service dbus start
sudo service x11-common start

4. Start Gnome shell

gnome-shell --x11 -r
@AmgadEbaid
Copy link

i get this when i run gnome-shell --x11 -r
libmutter-Message: 04:47:54.719: Running GNOME Shell (using mutter 42.5) as a X11 window and compositing manager
Failed to setup: Unable to open display, DISPLAY not set

also no gui app run like gimp and gives me Cannot open display:

@NShreyash
Copy link

Same problem with me also

@sametaor
Copy link

i get this when i run gnome-shell --x11 -r libmutter-Message: 04:47:54.719: Running GNOME Shell (using mutter 42.5) as a X11 window and compositing manager Failed to setup: Unable to open display, DISPLAY not set

also no gui app run like gimp and gives me Cannot open display:

I haven't tried this code out yet, but you can try using GWSL once, if on Windows 10, maybe that could yield better results? Just a thought.

@int0thevoid
Copy link

Same problem

@itsBemZ
Copy link

itsBemZ commented Jul 22, 2024

libmutter-Message: 14:03:15.809: Running GNOME Shell (using mutter 42.9) as a X11 window and compositing manager
Failed to setup: Unable to open display, DISPLAY not set

@artechio
Copy link

artechio commented Aug 26, 2024

It looks like you’re encountering an issue with GNOME Shell where the DISPLAY environment variable isn’t set. This is a common problem when trying to run graphical applications without a proper display environment.

Here are a few steps you can try to resolve this:

Set the DISPLAY variable: You can manually set the DISPLAY variable to the appropriate value. For example:
export DISPLAY=:0

Check your environment: Ensure that your session is running in an environment where a display server (like X11 or Wayland) is properly configured.

Use the correct flags: If you’re running GNOME Shell in a nested or headless mode, you might need to use specific flags.

[For example, using --x11 might help if you’re trying to run it in an X11 environment]

Verify dependencies: Make sure all necessary dependencies and libraries for GNOME Shell and Mutter are installed and up to date.
Restart the session: Sometimes, simply restarting your session or the display manager can resolve these issues.

If these steps don’t resolve the issue, providing more details about your setup and the exact commands you’re running could help in diagnosing the problem further.

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