DIR="/mnt/test"
mkdir -p $DIR
mount /dev/sdxx $DIR
mount /dev/sdxx $DIR/boot/efi
for f in proc sys tmp 'dev/pts' dev; do mount -o bind /$f $DIR/$f; done
/usr/bin/cp -rf /etc/resolv.conf $DIR/etc/resolv.conf
chroot $DIR /bin/bash

xhost local:localhost
chroot $DIR
export DISPLAY=:0
ProgrNameame

for f in proc sys tmp 'dev/pts' devpts dev 'boot/efi' ''; do umount $DIR/$f; done

chroot +xephyr
chroot +xnest

#Run the following command outside the chroot: 
Xnest -ac :1
Xephyr -ac :1
