Simple Xpra X11 bridge to enable GUI with any docker image
Run GUI applications in Docker with the same client(Xpra) on Windows, GNU/Linux, MacOS or web-browser over ssh or tcp.
docker run -d \ --name x11-bridge \ -e MODE="tcp" \ -e XPRA_HTML="yes" \ -e DISPLAY=:14 \ -e XPRA_PASSWORD=111 \ --net=host \ jare/x11-bridgedocker run -d
--name emacs-1
--volumes-from x11-bridge
-e DISPLAY=:14
jare/emacs emacsdocker run -d
--name emacs-2
--volumes-from x11-bridge
-e DISPLAY=:14
jare/emacs emacs
Then visit
http://localhost:10000/index.html?encoding=rgb32&password=111See
http://localhost:10000/connect.htmlfor options
docker run -d \ --name x11-bridge \ -e MODE="ssh" \ -v ~/.ssh/pub_rsa:/etc/pub-keys/me.pub \ -e DISPLAY=:14 \ --net=host \ jare/x11-bridgedocker run -d
--name emacs-1
--volumes-from x11-bridge
-e DISPLAY=:14
jare/emacs emacsdocker run -d
--name emacs-2
--volumes-from x11-bridge
-e DISPLAY=:14
jare/emacs emacs
Then attach to the Xpra server via cmd tool or Xpra's GUI app:
xpra attach --encoding=rgb --ssh="ssh -o StrictHostKeyChecking=no -p 22" ssh:[email protected]:14
-o StrictHostKeyChecking=no- it allows us to ignore server's identity instead adding it to
known_hosts. If you want to rely on the identity you should use a privately built image.
.pubi.e.
/etc/pub-keys/.pub
Lowest Bandwidthwhen using Xpra app with a local Xpra host.
Pageantyou can convert your rsa keys to
Pageant's format with
PuTTYgen
libGL.so.1(provided by libgl1-mesa-glx on Ubuntu) and font
docker run ... -v /tmp/spacemacs-mmap/:/tmp/spacemacs-mmap/ ... jare/x11-bridgeand attach with
TMPDIR=/tmp/spacemacs-mmap/ xpra attach --mmap=yes --encoding=rgb --ssh="ssh -o StrictHostKeyChecking=no -p 22" ssh:[email protected]:14
Webcam and sound are currently disabled