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

Enable Docker X11 Client Via SSH #37

Open
jagin opened this issue Mar 27, 2019 · 3 comments
Open

Enable Docker X11 Client Via SSH #37

jagin opened this issue Mar 27, 2019 · 3 comments

Comments

@jagin
Copy link

jagin commented Mar 27, 2019

Hi Oleg,

would it be possible to enable running a GUI program using SSH X11 forwarding?

Something like: https://stackoverflow.com/questions/40884589/x11-forward-to-windows-x-server-for-docker-client-in-aws

It would be nice feature especially when you work with OpenCV and video and want to quickly show the results on your host.

Regards,
Jarek

@apls777
Copy link
Collaborator

apls777 commented Mar 27, 2019

Hi Jarek,

Thanks for the idea, I will have a look into it this week.

Best regards,
Oleg

@apls777
Copy link
Collaborator

apls777 commented Apr 7, 2019

@jagin, I tried different solutions that I found on StackOverflow, but because I have a lack of understanding of how exactly X11 works, unfortunately, I couldn't make X11 forwarding work from inside of a container.

I will leave it here and, hopefully, this feature will find its contributor :).

@Tarang
Copy link

Tarang commented Dec 15, 2019

There's potentially a way to do this:

On the host you would have to create a ssh profile to tunnel into the docker container (make sure port 22 is exposed though)

Host container
    Hostname localhost
    Port 22
    User root
    ForwardX11 yes
    ForwardX11Trusted yes

Then you would ssh into the host with the -X flag (not quite sure how to do this with tmux, or whether it can work given it would have to ssh from an X11 terminal

ssh -X root@host

Once you're in the host you can ssh into the container

ssh -x container

Then run your command and X11 windows should work on your local machine

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

No branches or pull requests

3 participants