Commit 1fed637c authored by Stephanie's avatar Stephanie
Browse files

SCRUM#356: Ensures Xorg / Xephyr execution

parent 994e8531
......@@ -65,6 +65,20 @@ create_onboard_window () {
export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]}
Xorg ${DISPLAY_XORGS[$WINDOW_COUNTER]} &
pid=$!
# Guarantees the Xorg execution
xdpyinfo -display ${DISPLAY_XORGS[$WINDOW_COUNTER]}
EXIT_CODE=$?
while [[ $EXIT_CODE -ne 0 ]]; do
sleep 0.5
xdpyinfo -display ${DISPLAY_XORGS[$WINDOW_COUNTER]}
EXIT_CODE=$?
if ! kill -0 "${pid}" >/dev/null 2>&1; then
Xorg ${DISPLAY_XORGS[$WINDOW_COUNTER]} &
pid=$!
fi
done
$CREATE_WINDOW
......@@ -85,9 +99,24 @@ create_secundarycard_windows () {
# Run Xephyr to type in this output
Xephyr ${DISPLAY_XORGS[$WINDOW_COUNTER]} -output $i -noxv &
pid=$!
# Guarantees the Xephyr execution
xdpyinfo -display ${DISPLAY_XORGS[$WINDOW_COUNTER]}
EXIT_CODE=$?
while [[ $EXIT_CODE -ne 0 ]]; do
sleep 0.5
xdpyinfo -display ${DISPLAY_XORGS[$WINDOW_COUNTER]}
EXIT_CODE=$?
if ! kill -0 "${pid}" >/dev/null 2>&1; then
Xephyr ${DISPLAY_XORGS[$WINDOW_COUNTER]} -output $i -noxv &
pid=$!
fi
done
# Export display and create a window to write on this output
export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]}
$CREATE_WINDOW
# Again: the fake_seat display needs to be exported
......@@ -120,6 +149,7 @@ kill_jobs () {
############ BEGIN ############
# Guarantees the fake-seat execution, used to access the secondary board
Xorg $FAKE_DISPLAY -seat __fake-seat-1__ -dpms -s 0 -nocursor &
pid=$!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment