Skip to content

Commit

Permalink
Merge #1414
Browse files Browse the repository at this point in the history
1414: Check that gdbus has "wait" before using it r=wmww a=AlanGriffiths

Check that gdbus has "wait" before using it. (Fixes: #1413)

Co-authored-by: Alan Griffiths <[email protected]>
  • Loading branch information
2 people authored and wmww committed Apr 9, 2020
1 parent 6701850 commit 71a0d08
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions examples/miral-shell/miral-terminal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,19 @@ else
if [ -x "$terminal_server" ]; then break; fi
done

gdbus introspect --session --dest io.mirserver.Terminal --object-path /io/mirserver/Terminal > /dev/null 2>&1 || $terminal_server --app-id io.mirserver.Terminal&
gdbus wait --session io.mirserver.Terminal
if ! gdbus introspect --session --dest io.mirserver.Terminal --object-path /io/mirserver/Terminal > /dev/null 2>&1
then
$terminal_server --app-id io.mirserver.Terminal&

if (gdbus help | grep wait > /dev/null)
then
gdbus wait --session io.mirserver.Terminal
else
while ! gdbus introspect --session --dest io.mirserver.Terminal --object-path /io/mirserver/Terminal > /dev/null 2>&1
do
sleep 0.2
done
fi
fi
exec $terminal --app-id io.mirserver.Terminal "$@"
fi

0 comments on commit 71a0d08

Please sign in to comment.