0

I am running Ubuntu 20.04 on Windows 10. Running uname -r returns: 5.4.72-microsoft-standard-WSL2. I am trying to run deja-dup, but am having no luck. When I try kicking it off from a Ubuntu terminal, I get the message:

Unable to init server: Could not connect: Connection refused

(org.gnome.DejaDup:29): Gtk-WARNING **: 14:01:49.822: cannot open display:

Searching for how to run it, it looks like most people kick it off using something called Dash (which I am not familiar with). I do have something installed at /usr/bin/dash which when I run it get the following message: dash: 0: Bad substitution

It was awhile ago since I installed Ubuntu, but I don't believe I did anything to it to run apps with a GUI.

Can someone help point me in the right direction?

Thank you very much.

Based on the comment to add notes on what I did to allow Ubuntu to run apps with a GUI, I just now did a search and tried the following: https://linuxconfig.org/ubuntu-20-04-gui-installation

I got to step 6 where it said to do a reboot, but that failed due to: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

So, I tried starting it via startx. When doing that, I got an error: /usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server

I found that I could update the file Xwrapper.config in /etc/X11 from allowed_users=console to allowed_users=anybody.

Now when I run startx, I get: (EE) Fatal server error: (EE) no screens found(EE) (EE)

Any ideas?

John B
  • 3
  • Please edit your question and add the following information: Are you using WSL1 or WSL2? Have you done any modification to the WSL Ubuntu installation so that it can run apps with a GUI? If so, list the exact procedure you used in your question. – user68186 Jun 12 '22 at 21:45

1 Answers1

0

WSL on Windows 10 does not have any ability to run GUI applications (including an X server itself). If you don't have any other data in Ubuntu/WSL, I'd probably uninstall and reinstall, since you have a lot of unnecessary packages by following the instructions you linked.

You have three main options for running GUI applications under WSL:

  • Upgrade to Windows 11, where WSL2 does have the built-in ability to run GUI applications using the WSLg feature.
  • Use a third-party X server in Windows (not Ubuntu).
  • Access Ubuntu through xrdp using the Remote Desktop client in Windows.

You'll find more details on these options in several questions:

As for trying to run Ubuntu Desktop on WSL2, I recommend that you do not for answers you'll find in this answer. You don't need a Linux desktop in WSL (Windows is your desktop); just an X or Wayland server. If you feel the need for one, try Xfce4 since it does not have the Systemd dependency that Gnome does.

NotTheDr01ds
  • 17,888