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

nvidia-docker2 tutorial fails even when following exact steps

asked 2018-11-14 18:26:52 -0500

tristochief117 gravatar image

I am following this tutorial. After running run_my_image.sh from the tutorials, this is the output:

xauth:  /tmp/.docker.xauth not writable, changes will be ignored
xauth: (argv):1:  unable to read any entries from file "(stdin)"
chmod: changing permissions of '/tmp/.docker.xauth': Operation not permitted

then inside the docker interactive terminal, after running rosrun rviz rviz here is the output:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display 
Could not connect to any X display.

my $DISPLAY = :1

after looking at this post, I did try to add xhost +si:localuser:root at the beginning of my run_my_image.sh file, yet the error still showed up. I also tried xhost +"local:docker@"; but still same resoponse.

I am running docker without sudo, but docker has been added to the sudo user group.

I also tried sudo ./run_my_image.sh and this is the output from the host terminal:

xauth: (argv):1: unable to read any entries from file "(stdin)" non-network local connections being added to access control list

yet the display error inside docker terminal does not change. Its the same as above.

my docker version is 18.06.1-ce but I did try 18.09, yet uninstalled it and reverted back when I realized that the update didn't change anything.

My system is ubuntu 18.04 Bionic.

edit retag flag offensive close merge delete

Comments

+1 for adding the line xhost +si:localuser:root to the script, chown 1000:1000 /tmp/.docker.xauth is also worth trying.

fvd gravatar image fvd  ( 2019-05-01 05:25:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-11-14 21:02:28 -0500

tristochief117 gravatar image

found the answer,

The tutorial has a typo.

inside the run_my_image.bash file, change the docker run option --env to --env="DISPLAY=$DISPLAY" instead of --env="DISPLAY"

I don't know how I didn't see this typo, but of course if the docker container didn't have a DISPLAY variable set, then of course it would display the error above.

a side note, the docker tutorial has another error in it: the docker run option (again inside the bash script) *-env="XAUTHORITY=$XAUTH" * is missing a - change it from *-env="XAUTHORITY=$XAUTH" * to *--env="XAUTHORITY=$XAUTH" * notice the extra - (dash ) symbol

edit flag offensive delete link more

Comments

1

If you feel the tutorial is incorrect, then please register for a wiki account and correct the text. That's why it is a wiki.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-15 12:38:27 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-14 18:24:48 -0500

Seen: 2,753 times

Last updated: Nov 14 '18