Giter VIP home page Giter VIP logo

docker-x11-bridge's Introduction

Pluggable X11 GUI for docker images

Run GUI applications in Docker with the same client(Xpra) on Windows, GNU/Linux, MacOS or web-browser over ssh or tcp.

(clickable!) img/demo.jpg

Try It!

docker run -d \
 --name x11-bridge \
 -e MODE="tcp" \
 -e XPRA_HTML="yes" \
 -e DISPLAY=:14 \
 -e XPRA_PASSWORD=111 \
 -p 10000:10000 \
 jare/x11-bridge

docker run -d \
 --name emacs-1 \
 --volumes-from x11-bridge \
 -e DISPLAY=:14 \
 jare/emacs emacs

docker run -d \
 --name emacs-2 \
 --volumes-from x11-bridge \
 -e DISPLAY=:14 \
 jare/emacs emacs

Then visit http://localhost:10000/index.html?encoding=png&password=<PASSWORD>

Or via ssh:

docker run -d \
 --name x11-bridge \
 -e MODE="ssh" \
 -p 22:22 \
 -v ~/.ssh/pub_rsa:/etc/pub-keys/me.pub \
 -e DISPLAY=:14 \
 jare/x11-bridge

docker run -d \
 --name emacs-1 \
 --volumes-from x11-bridge \
 -e DISPLAY=:14 \
 jare/emacs emacs

docker 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:xpra@localhost:14

  • Note -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.
  • All names of the pub keys should end with .pub i.e. /etc/pub-keys/<key_name>.pub
  • If Xpra lags, select Lowest Bandwidth when using Xpra app with a local Xpra host.
  • With Windows client you'll need Pageant you can convert your rsa keys to Pageant's format with PuTTYgen
  • GUI app in your image may requirelibGL.so.1 (provided by libgl1-mesa-glx on Ubuntu) and font
  • It is good idea to use ssl proxy or mount a certificate (see Xpra start-up message) if you want to use tcp or html mode beyond local network
  • You can modify the user
  • To use Xpra mmap(Linux): docker run ... -v /tmp/spacemacs-mmap/:/tmp/spacemacs-mmap/ ... jare/x11-bridge and attach with TMPDIR=/tmp/spacemacs-mmap/ xpra attach --mmap=yes --encoding=rgb --ssh="ssh -o StrictHostKeyChecking=no -p 22" ssh:xpra@localhost:14

Webcam and sound are currently disabled

docker-x11-bridge's People

Contributors

jaremko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.