Open ssonnenwald opened 3 years ago
Maybe try something like this:
x_works(){
# Bash will return 127
# If X cant connect, it returns 1
# If X can connect, it returns 0
xdpyinfo 1>/dev/null 2>&1
WORKS="$?"
return $WORKS
}
if x_works; then
By the way WSL1 says:
awk: fatal: cannot open file `/proc/fb' for reading (No such file or directory)
I'm submitting a ... (check one with "x")
Bug report Screenfetch(version 3.9.1) -- When DISPLAY has an ip on a WSL2 Unbuntu 20.04 without X then screenfetch just hangs for awhile then prints xdpyinfo: unable to open display "xxxxxxx" -- If I export DISPLAY="" then it works fine.
Distro name: Homepage: Distro logo: Package manager:
Show us the output of => lsb_release -sirc => cat /etc/os-release => ls -1 /etc/*-release Ubuntu 20.04 focal