Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display problem #17

Open
LyubomyrD opened this issue Sep 4, 2018 · 8 comments
Open

Display problem #17

LyubomyrD opened this issue Sep 4, 2018 · 8 comments

Comments

@LyubomyrD
Copy link

Dear jacknlliu

Thank You for opensourcing this great dockerfile.

I was trying to run it and obtained the following error. May I, please ask You to help me resolving this issue?
I followed instructions from dockerhub

  1. docker pull jacknlliu/ros:kinetic-ide-init

  2. xhost +

  3. docker run --privileged
    --security-opt label=disable
    --security-opt seccomp=unconfined
    --env="DISPLAY" --env QT_X11_NO_MITSHM=1
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw"
    --volume="/home/1/Workspace:/data:rw"
    --volume="/home/1/Workspace/gazebo_models:/home/ros/.gazebo/models:rw"
    --name="ros_kinetic"
    jacknlliu/ros:kinetic-ide-init terminator

Tips: if you use NVIDIA video cards, you should install NVIDIA video driver for 3D graphics support!
WARNING: Configuration file format is newer than the current version, please specify the current version number (3.5) in the @Version directive. syslog-ng will operate at its highest supported version in this mode;
Sep 4 00:07:36 c913db85046c syslog-ng[50]: syslog-ng starting up; version='3.5.6'
Sep 4 00:07:37 c913db85046c syslog-ng[50]: EOF on control channel, closing connection;
Sep 4 00:07:37 c913db85046c cron[62]: (CRON) INFO (pidfile fd = 3)
Sep 4 00:07:37 c913db85046c cron[62]: (CRON) INFO (Running @reboot jobs)
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/init.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
You need to run terminator in an X environment. Make sure $DISPLAY is properly set
Sep 4 00:07:38 c913db85046c syslog-ng[50]: syslog-ng shutting down; version='3.5.6'
Sep 4 00:07:38 c913db85046c syslog-ng[50]: EOF on control channel, closing connection;

@jacknlliu
Copy link
Owner

Hi, it seems that DISPLAY is not set by the terminal. Which Linux distribution are you using?

@LyubomyrD
Copy link
Author

I am using Ubuntu 16.04 LTS

@jacknlliu
Copy link
Owner

Do you run this command at your local host PC directly, or using ssh to run these at some remote PC?

@ldemk
Copy link

ldemk commented Sep 4, 2018

I am running everything from my local PC

@jacknlliu
Copy link
Owner

Could you show the output of the following commands?

echo $DISPLAY

ls -al /tmp/.X11-unix

xauth info

xauth nlist $DISPLAY

@ldemk
Copy link

ldemk commented Sep 4, 2018

The result of commands execution are the following

$ echo $DISPLAY
:0

I want to point out about the next command that I changed the name of the month from my language to English - "september"

$ ls -al /tmp/.X11-unix
total 8
drwxrwxrwt  2 root root 4096 september  4 10:04 .
drwxrwxrwt 36 root root 4096 september  4 18:05 ..
srwxrwxrwx  1 root root    0 september  4 09:33 X0

I changed the user name. I hope that this is OK

$ xauth info
Authority file:       /home/my_user_name/.Xauthority
File new:             no
File locked:          no
Number of entries:    2
Changes honored:      yes
Changes made:         no
Current input:        (argv):1
$ xauth nlist $DISPLAY
0100 0006 77756b6f6e67 0001 30 0012 4d49542d4d414749432d434f4f4b49452d31 0010 a4a06217a3c168bda29aef0e5e1ae3ac

@jacknlliu
Copy link
Owner

I think the issue is about the privilege of /tmp/.X11-unix/X0.

Could you change the privilege of /tmp/.X11-unix/X0 to the current normal user?

sudo chown <your_user_name>:<your_user_name>  /tmp/.X11-unix/X0

@ldemk
Copy link

ldemk commented Sep 4, 2018

It helped!!!!

Thank You so much for Your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants