ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hi

I also have this error and solved by below step, and hope this can give you a hint to fix your problem.

device: ubuntu 20.04 LTS

without nivida gpu:

xhost local:root XAUTH=/tmp/.docker.xauth docker run --rm -it \ --name=linux_gui \ --env="DISPLAY=$DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ --env="XAUTHORITY=$XAUTH" \ --volume="$XAUTH:$XAUTH" \ --net=host \ --privileged \ osrf/ros:humble-desktop-03 \ bash

with nivida gpu: sudo apt-get update sudo apt-get install nvidia-container-runtime sudo apt-get install nvidia-docker2 sudo systemctl daemon-reload sudo systemctl restart docker

xhost local:root XAUTH=/tmp/.docker.xauth docker run --rm -it \ --env="DISPLAY=$DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ --env="XAUTHORITY=$XAUTH" \ --volume="$XAUTH:$XAUTH" \ --net=host \ --privileged \ --runtime=nvidia \ osrf/ros:humble-desktop-03 \ bash