#!/bin/bash xhost +local: mount -o ro --bind / /opt/kav/rootfs/discs/D: cat /opt/kav/rootfs/etc/bash/bashrc | sed 's/^export\ DISPLAY.*/export\ DISPLAY='$DISPLAY'/g' > /opt/kav/root/etc/bash/bashrc systemd-nspawn -D /opt/kav/rootfs --bind /tmp/.X11-unix:/tmp/.X11-unix --machine=kav umount /opt/kav/rootfs/discs/D: