Debian Codegraph @

miriway-run

raw symbols SCIP
1 #!/bin/bash
2
3 bindir=$(dirname "$0")
4
5 if [ "${bindir}" != "" ]; then bindir="${bindir}/"; fi
6
7 unset WAYLAND_DISPLAY
8 port=0
9 while [ -e "${XDG_RUNTIME_DIR}/wayland-${port}" ]; do
10 let port+=1
11 done
12 wayland_display=wayland-${port}
13
14 WAYLAND_DISPLAY=${wayland_display} MIR_SERVER_DISPLAY_AUTOSCALE=1200 "${bindir}"miriway-run-shell&
15 miriway_pid=$!
16
17 # Wait until the server starts
18 until [ -O "${XDG_RUNTIME_DIR}/${wayland_display}" ]
19 do
20 if ! kill -0 ${miriway_pid} &> /dev/null
21 then
22 echo "ERROR: miriway-run-shell [pid=${miriway_pid}] is not running"
23 exit 1
24 fi
25 inotifywait -qq --timeout 5 --event create "$(dirname "${XDG_RUNTIME_DIR}/${wayland_display}")"
26 done
27
28 XDG_SESSION_TYPE=mir GDK_BACKEND=wayland,x11 QT_QPA_PLATFORM=wayland SDL_VIDEODRIVER=wayland WAYLAND_DISPLAY=${wayland_display} NO_AT_BRIDGE=1 "$@"
29 kill $miriway_pid