Can't get clipboard forwarding working, while being in Docker under SSH

  1. I have SSH connection to the server without X session. I’ve set up SSH to forward X. When I get connected to that server over SSH and type:

user@host-machine:~$ ssh remote-server

user@remote-server:~$ echo hello | xsel -bi

  • Linking many containers in Docker
  • Installing a specific version of docker-engine (v1.7+) on Ubuntu?
  • How can I start php-fpm in a Docker container by default?
  • Fig apparently not using volume_from on mysql service
  • how to map a local folder as the volume the docker container or image?
  • How to run a CMD and open Bash when running a docker container?
  • all goes right – I’m getting “hello” on my host’s clipboard.

    1. I have simple Docker image based on Ubuntu. I run the the image with following parameters: docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash. Then, being inside container I’m typing:

    user@host-machine:~$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash

    user@92c40ac9feb7:~$ echo hello | xsel -bi

    all goes right – I’m getting “hello” on my host’s clipboard.

    1. Now I want to run Docker image on those server being under SSH session with X forwarding enabled. When I’m trying to copy something to the clipboard in this configuration, I’m getting following error:

    user@host-machine:~$ ssh remote-server

    user@remote-server:~$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix myimage bash

    user@688e48e4b90a:~$ echo hello | sudo xsel -bi

    xsel: Can’t open display: (null)

    : Connection refused

    user@688e48e4b90a:~$

    Why I can’t get clipboard forwarding working, while being in Docker container under SSH session?

  • application performance decrease a lot in docker
  • Docker fails at first run after install. Error Post http://… permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?
  • Debugging staging docker compose server with pycharm
  • Docker does not run cron job files with external origin (host - windows)
  • Creating bash script from Dockerfile strips comments
  • Change Docker for windows to use another VM besides MobylinuxVM
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.