Is it possible to tunnel a display from docker to ec2 instance and then to local?

31 Views Asked by At

I'll try to be as clear and complete as possible. I'm working with Ubuntu and from my local laptop I ssh to an ec2 instance (AWS): in doing this I'm using "-X" flag to enable x11 tunneling and as a matter of fact if I do xclock or xmessage when ssh'd, everything get displayed locally in the right way. Now, I setup a docker inside the ec2 instance, which contains some ROS stuff and in particular should open RVIZ: to run the docker the command

sudo xhost local:root

is used. This is the issue, even if I try to solely run rviz instead of using that command, in both cases I get the error:

X11 connection rejected because of wrong authentication.
xhost:  unable to open display "localhost:10.0"

which instead does not appear when trying xclock and xmessage

Is this something that is not possible to do in any way? I read all related stuff on this website (Magic cookie, xauth and so on) but I can't find a solution, can you help me please?

0

There are 0 best solutions below