Last active
February 13, 2019 23:53
-
-
Save rlan/6215eaca876c2fd7bb0739fe6dc7ceb0 to your computer and use it in GitHub Desktop.
Run GUI applications from Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Usage ./gui_docker osrf/ros:kinetic-desktop-full | |
| # | |
| # Host-side pre-requisite: | |
| # Linux: a desktop environment, e.g., GNOME | |
| # MacOS: XQuartz (https://www.xqartz.org/) | |
| # Windows: Xming (http://www.straightrunning.com/XmingNotes/) | |
| # | |
| xhost +local:root | |
| docker run -it --rm \ | |
| --env="DISPLAY" \ | |
| --env="QT_X11_NO_MITSHM=1" \ | |
| --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ | |
| $1 \ | |
| bash | |
| xhost -local:root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment