1

I'm running Ubuntu 18.04 on Windows Powershell on Windows 10. I installed XMing and PuTTY and configured them so that X11 forwarding is turned on. After all this, and installing x11-apps and running xeyes, it tells me "Error: Can't open display: 0.0". I tried changing the DISPLAY to 0 and 'localhost:0.0, but nothing. I installed several packages, many of which will probably end of being unnecessary. I've tried just about everything in the responses both of these questions: X "Can't open display: :0" while DISPLAY variable is correct Can I launch a graphical program on another user's desktop as root?, but

who | awk -v user="$target_user" '$1 == user && $2 ~ "^:" {print $2}'

returns nothing and xhost + gives me the same display error. I tried various configuration files such as xauth, /etc/X11/Xwrapper.config. It might be important to note that xinit returns the fatal error no screens found and /var/log/Xorg.0.log shows many errors

dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)
open /dev/dri/card0: No such file or directory
open /dev/fb0: No such file or directory
No devices detected.

I need to be able to use image tools like ds9 for my research and have been unable to do so, so any help would be very much appreciated.

2
  • are you using wsl 1 or 2? Dec 6, 2020 at 0:21
  • I was using WSL 2, but after seeing that that complicates the configuration I converted to WSL 1, still with the same problem except now xinit gives the fatal error parse_vt_settings: Cannot open /dev/tty0 (Input/output error)
    – messick
    Dec 7, 2020 at 23:42

1 Answer 1

0

I was able to solve this with the above comment. The problem was that I had installed WSL2, but configuring Ubuntu as WSL1. I was able to run xeyes successfully (and pass all pertinent smoke tests) when I reverted to WSL1 and added

export DISPLAY=:0.0
export LIBGL_ALWAYS_INDIRECT=1

to ~/bash.rc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .