Skip to content
Snippets Groups Projects
Commit 1fed637c authored by Stephanie's avatar Stephanie
Browse files

SCRUM#356: Ensures Xorg / Xephyr execution

parent 994e8531
No related branches found
No related tags found
1 merge request!7SCRUM#356: Check if Xorg / Xephyr suffered a fatal error and try to run again
...@@ -65,6 +65,20 @@ create_onboard_window () { ...@@ -65,6 +65,20 @@ create_onboard_window () {
export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]} export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]}
Xorg ${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 $CREATE_WINDOW
...@@ -85,9 +99,24 @@ create_secundarycard_windows () { ...@@ -85,9 +99,24 @@ create_secundarycard_windows () {
# Run Xephyr to type in this output # Run Xephyr to type in this output
Xephyr ${DISPLAY_XORGS[$WINDOW_COUNTER]} -output $i -noxv & 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 and create a window to write on this output
export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]} export DISPLAY=${DISPLAY_XORGS[$WINDOW_COUNTER]}
$CREATE_WINDOW $CREATE_WINDOW
# Again: the fake_seat display needs to be exported # Again: the fake_seat display needs to be exported
...@@ -120,6 +149,7 @@ kill_jobs () { ...@@ -120,6 +149,7 @@ kill_jobs () {
############ BEGIN ############ ############ BEGIN ############
# Guarantees the fake-seat execution, used to access the secondary board
Xorg $FAKE_DISPLAY -seat __fake-seat-1__ -dpms -s 0 -nocursor & Xorg $FAKE_DISPLAY -seat __fake-seat-1__ -dpms -s 0 -nocursor &
pid=$! pid=$!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment