View Single Post
Old 12-14-2015, 10:32 PM   #4
programagor
Human Tinkerer
programagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the roughprogramagor is a jewel in the rough
 
Posts: 3
Karma: 7140
Join Date: Dec 2015
Device: Kindle PW2
I didn't actually kill the lab126 GUI, I started Xephyr to run the new X in a "window" on top of the lab126 GUI. Otherwise all is correct.

The mounting scripts are as follows:

xep.sh (started by KUAL):
Code:
#!/bin/sh
ARCH=/mnt/base-us/extensions/arch
bash $ARCH/arch.sh /start-xep.sh
arch.sh (invoked by xep.sh):
Code:
#!/bin/sh
ARCH=/mnt/base-us/extensions/arch
killall Xephyr
bash $ARCH/mount.sh
bash $ARCH/mount_aux.sh
chroot $ARCH/os/ /bin/bash $@
killall Xephyr
bash $ARCH/umount.sh
sleep 1
bash $ARCH/umount.sh
mount.sh (first mounting script invoked by arch.sh):
Code:
#!/bin/sh
ARCH=/mnt/base-us/extensions/arch
rm /dev/loop/arch #just in case
mknod -m0660 /dev/loop/arch b 7 250
losetup -d /dev/loop/arch
mount -o loop=/dev/loop/arch,noatime -t ext3 $ARCH/arch.img $ARCH/os/
mount_aux.sh (second mounting script invoked by arch.sh):
Code:
#!/bin/sh
ARCH=/mnt/base-us/extensions/arch
mount -o bind /dev $ARCH/os/dev
mount -o bind /proc $ARCH/os/proc
mount -o bind / $ARCH/os/host
mount /dev/loop/0 $ARCH/os/mnt/us
start_xep.sh: (called from within the chroot environment)
Code:
#!/bin/bash
export DISPLAY=:0
Xephyr :1 -title "L:A_N:application_ID:xephyr" -screen 758x987 -cc 4 -nocursor &
sleep 1
export DISPLAY=:1
#/etc/X11/xinit/xinitrc.d/30-dbus start &
xfwm4 --display=:1 &
xfce4-panel &
xfdesktop &
sleep 8
xvkbd -geometry 758x350+0-350
#/etc/X11/xinit/xinitrc.d/30-dbus stop
killall Xephyr
umount.sh (unmounting script invoked by arch.sh):
Code:
#!/bin/sh
ARCH=/mnt/base-us/extensions/arch
umount $ARCH/os/mnt/us
umount $ARCH/os/host
umount $ARCH/os/proc
umount $ARCH/os/dev
sleep 1
umount -d $ARCH/os/
rm /dev/loop/arch

Last edited by programagor; 12-14-2015 at 11:50 PM.
programagor is offline   Reply With Quote