Skip to content

Instantly share code, notes, and snippets.

@pklaus pklaus/run_docker_x11.sh forked from slok/run_docker_x11.sh
Last active May 13, 2019

Embed
What would you like to do?
x11 with docker archlinux
#!/bin/bash
KEY=$(xauth list | grep "$(hostname)/unix:0" | awk '{ print $3 }' | head -n 1)
CONT_HOSTNAME=docker-skype
xauth add $CONT_HOSTNAME/unix:0 . $KEY
docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:/tmp/.Xauthority \
-v /dev/snd:/dev/snd \
-e DISPLAY=unix$DISPLAY \
-e XAUTHORITY=/tmp/.Xauthority \
-h $CONT_HOSTNAME \
arch_image_with_xorg-xclock_package \
xclock
xauth remove $CONT_HOSTNAME/unix:0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.