Gazebo GUI Not Showing Up when running WSL2 Graphics on Windows 11 - qt5

I am attempting to use ROS with the Gazebo GUI. I recently upgraded to Windows 11 for the WSL GUI support and have the gedit GUI working. However, when I run the command $ gazebo, the GUI does not open.
Running $ gazebo --verbose gives the following error messages
[Err] [RenderEngine.cc:749] Can't open display: :0
[Err] [GuiIface.cc:124] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
After enabling the QT Debug environment variable using export export QT_DEBUG_PLUGINS=1 and rerunning the gazebo command with the verbose option set, It shows me
[Dbg] [GuiIface.cc:112] Got keys from plugin meta data ("xcb")
[Dbg] [GuiIface.cc:112] QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
[Dbg] [GuiIface.cc:112] loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
I believe that I have all of the necessary packages installed from this output, so I am wondering why gazebo is not showing up. I have tried uninstalling/reinstalling gazebo to no avail.
Thank you so much for your time. If I get this problem sorted out, I will post. Please let me know if any other system/output information is needed.
Other information:
I am not using X Server because the Windows 11 upgrade does not require it for graphical WSL applications (but did try it with X Server installed just in case)
I have tinkered around with the ~/.bashrc profile. DISPLAY=0:0 option was set, but I deleted this because Windows 11 did not need it (or so I think?)

Solution:
After reading up online, I found this answer to a similar question to mine.
https://superuser.com/questions/1681647/windows-11-wsl-not-opening-gui-in-my-ubuntu-shell
Getting ubuntu and re-installing gazebo on that worked. Now I can open up the Gazebo GUI.

Related

VSCode WSL - Installing VS Code Server for x64 - FAIL

Can anyone decode the following for me?
WSL was working perfectly on C++ a few weeks back.
Switched to try to run older Python under windows (not WSL) and it seems all twisted up now.
Can't get Win10 nor WSL to run. Keeps trying and failing to update. I re-ran the WSL and updated VSCode on the windows side. I AM behind a proxy but as far as I know, I've update all the files that google searches pointed me at. Pretty frustrated and would appreciate any help there is.
"
Request downloadRequest failed with message: getaddrinfo ENOTFOUND update.code.visualstudio.com. Will try to download on WSL side."
"
[2022-02-10 13:51:09.374] Setting up server environment: Looking for /home/ubuntu/.vscode-server/server-env-setup. Not found.
[2022-02-10 13:51:09.374] WSL version: 4.4.0-19041-Microsoft Ubuntu-20.04
[2022-02-10 13:51:09.374] Updating VS Code Server to version d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03
[2022-02-10 13:51:09.374] Removing previous installation...
[2022-02-10 13:51:09.674] Installing VS Code Server for x64 (d6ee99e4c045a6716e5c653d7da8e9ae6f5a8b03)
[2022-02-10 13:51:09.674] Downloading:
[2022-02-10 13:52:43.314] VS Code Server for WSL failed to start. No messages received for 90s
[2022-02-10 13:52:43.314] For help with startup problems, go to
[2022-02-10 13:52:43.314] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2022-02-10 13:52:43.328] WSL Daemon exited with code 0
"
I'm not 100% which step fixed it however I was able to proceed after.
Launching C++ project in wsl also tried to update and failed. The difference being that the install button did actually install the wsl server update w/o fail. So that error was gone.
I then launched another VSCode session with the Python project and the cmd terminal. I then had to use this help (https://github.com/pypa/pip/issues/9216#issuecomment-741836058) to adjust the proxy.
I could then proceed to reinstall ipykernel which is what had stopped working and was blocking me.
I'm pretty sure my environments are conflicting with each other. I'm afraid I don't understand VSCode environments well enough and very likely caused this problem for myself.

Psychopy stack smashing detected

I am trying to execute the following basic psychopy (version 2021.2.3) code through the Python 3.6.13 console:
import psychopy.visual as pv
pv.Window()
Which gives the following error.
*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)
The only related topic I can find is on the psychopy forum with no answers
I'm running this on an Ubuntu 18.04.05 machine. The machine is initialized as a headless server, but I am trying to run this through RDP.
I installed psychopy using pip inside a conda environment. Initially I was getting errors related to wxPython. When I manually installed wxPython from a whl file that error was resolved and error in this question appeared.
My guess is that this is to do with the version of one of the libraries but very hard to tell from this limited info.
What version of PsychoPy are you trying to install and by what means are you installing it? Are you running from the app or is this a script you're trying to launch from the terminal? ie. trying to work out what parts of PsychoPy this is affecting (the app, the visual lib, the gui libs...?)
I had a very similar problem on ubuntu 18.04.5, psychopy 3.2.4, no headless server. I suspect that the problem is general but ubuntu/drivers related.
My solution was to update the system and to install&switch to a proprietary NVIDIA driver.

Ubuntu on WSL doesn't launch

I have installed Ubuntu 18.04 for windows subsystem for linux on windows 10, after enabling WSL in Powershell (instructions here: https://learn.microsoft.com/en-us/windows/wsl/install-win10).
I've done this before on a desktop but now I'm doing it on a laptop. I had no issues with the previous installation but this time around ubuntu will not launch. I get the ubuntu console popping up briefly before disappearing.
Also trying to run bash.exe from the command line fails silently (doesn't hang, just exits with no message), which may be related.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Setup is a windows 10 Pro, os build 17134.376, everything up to date.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Check with wslconfig.exe /l all registered distros, try to deregister the one you have problem with ( e.g. wslconfig.exe /u Ubuntu [^1]) and run the ubuntu.exe in your distro once again. Just a wild guess, it might be also a problem, if you have more than one copy of the linux distribution in you home directory.
[^1]: Warning: deregistering will delete all the associated files!

install weblogic on VM with Solaris OS

I stuck in install weblogic on my vm solaris. i try that
java -d64 -jar fmw_12.2.1.3.0_wls.jar
and i got an error
Checking monitor: must be configured to display at least 256 colors. DISPLAY environment variable not set. Failed <<<<
Any solution for these error?
This happens if you want to do an graphical install of the system without having a X11 running. The error message is quite normal for such an situation.
You could:
Not running the installer in the graphical mode by doing a silent install (please refer to https://docs.oracle.com/cd/E24329_01/doc.1211/e24492/silent.htm#WLSIG131 for information)
Install the nescessary package to have an X11 and stuff running in your VM with pkg install solaris-desktop. Then execute the java command again from the GUI . This obviously only works if you can get a the graphical output of the VM for example via VNC or other tools.
You could set the DISPLAY variable to an installed X11 implementation. For example i use Xquartz on my Apple notebook. Then configure DISPLAY and XAUTHORITY correctly. Or you could simply log into the Solaris system with ssh -X . I prefer the second one, as it does everything automatically.

Does Chromium headless work on Windows Server Core 2016?

Background
I am tasked with replacing our IE based printing logic with Chromium so that we can eventually support running our current server software on Windows Server Core or potentially other operating systems that support .Net Core. My current thought is to either use Chromium embedded framework or to make use of Puppeteer. I am leaning towards the later because I feel it would be easier to port between operating systems.
Issue
Originally it failed to start with an error about sandboxing so I added the no-sandbox flag. Now when I try to load Chromium it fails to start with the exception below stating that it cannot load chrome.dll
PS C:\Program Files (x86)\Google\Chrome\Application>> .\chrome --headless --enable-logging --disable-gpu --screenshot="C:\screen.png" "https://www.chromestatus.com/"
Which yields the following error in the debug.log file:
[0813/133208.016:ERROR:main_dll_loader_win.cc(134)] Failed to load Chrome DLL from c:\Program Files (x86)\Google\Chrome\Application\68.0.3440.106\chrome.dll: The specified module could not be found. (0x7E)
I have checked around the internet and found a few mentions of this error but the suggested fixes don't seem to fix the issue.
I was able to download Chromium 72.0.3592.0 via Chocolatey and the issue is resolved in that version. I tested using Server Core 2016 LTSB.
choco install chromium --pre -y
chrome --headless --disable-gpu --dump-dom --enable-logging https://www.chromestatus.com/ --no-first-run
Edit:
If you are attempting to run Selenium Tests using Docker windowsservercore and chromium: The command line tests of chromium chrome.exe appear to never work from the container command line.
However when you run dotnet test app.csproj or dotnet vstest app.dll inside the container the webdriver successfully starts and drives the browser
This has been reported to the Chromium team. It appears that Chromium 68+ might have issues with Windows Server 2016.
https://bugs.chromium.org/p/chromium/issues/detail?id=873097