osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
559 stars 73 forks source link

Setting --network host unable to run rviz #169

Closed MrOCW closed 2 years ago

MrOCW commented 2 years ago

rocker <image> --x11 --nvidia --network host followed by rosrun rviz rviz would give

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[ INFO] [1643568634.029569269]: rviz version 1.14.13
[ INFO] [1643568634.029595929]: compiled against Qt version 5.12.8
[ INFO] [1643568634.029603999]: compiled against OGRE version 1.9.0 (Ghadamon)
dbus[30]: The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.
Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)

However, rocker <image> --x11 --nvidia would have no issue with rviz

MrOCW commented 2 years ago

adding --privileged solved this problem. i.e. rocker <image> --x11 --nvidia --network host --privileged