#!/bin/bash
# Loading X11 Service
echo Load Xephyr
Xephyr -br -ac -noreset -resizeable -title "GXDE OS" :1 &
# Reset $DISPLAY
export DISPLAY=:1
checkTime=0
while [[ ! -f /tmp/.X11-unix/X1 ]]
do
    checkTime=$[$checkTime+1]
    if (( $checkTime > 50 )); then
        break
    fi
    sleep 0.1
done
echo Find Display :1
echo Load GXDE Desktop
dbus-launch --exit-with-session startgxde
