ROS Rviz Error: “Could not connect to any X display”
I am struggling since days to install ROS & Rviz on my Windows 10 Pc. I first installed Ubuntu melodic using windows app store and followed the tutorial from ROS Wiki (http://wiki.ros.org/ROS/Tutorials/Ins...). So, I tried to start rviz using:
roscore &
rosrun rviz rviz
Then it says: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user' qt.qpa.screen: QXcbConnection: Could not connect to display Could not connect to any X display.
Using
sudo visudo
I added these 2 lines to sudoers.tmp
Defaults env_keep+="DISPLAY XAUTHORITY"
Defaults env_keep+="XDG_RUNTIME_DIR"
However the same error occurs. What else could I try?