When I try to start a graphical interface such as xclock, I get an error message:
Error: Can't open display:
I am trying to use Docker to run a ROS container, and I need to see GUI applications that run inside it.
I did this once with the Vagrant VM and was able to use X11 to do this.
So far I have tried putting # 1 and # 2 in a docker file based on the information here:
http://wiki.ros.org/docker/Tutorials/GUI
Then I tried to copy most of the docker file:
https://hub.docker.com/r/mjenz/ros-indigo-gui/~/dockerfile/
Here is my current docker file:
FROM ros:kinetic
MAINTAINER me
ENV DISPLAY $DISPLAY
ENV QT_X11_NO_MITSHM 1
run apt-get update
run apt-get install x11-apps --assume-yes
ARG uid=1000
ARG gid=1000
RUN export uid=${uid} gid=${gid} && \
groupadd -g ${gid} ros && \
useradd -m -u ${uid} -g ros -s /bin/bash ros && \
passwd -d ros && \
usermod -aG sudo ros
USER ros
WORKDIR /home/ros
RUN echo "\nsource /opt/ros/kinetic/setup.bash" >> /home/ros/.bashrc
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
source
share