xephyr-wrapper 659 Bytes
Newer Older
1
2
3
#!/bin/bash

# Script adapted from Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
4
5
6
7
8

tries=10
export DISPLAY=${1}
shift

9
10
11
12
# We've found that latest Xephyr may segfault on 64-bit systems
# if XVideo extension is enabled.
[ "$(uname -i)" = "x86_64" ] && no_xv="-noxv"

13
14
# This is a workaround for the case Xephyr is started before host Xorg
# server is ready for connections, despite the socket activation.
15
16
17
#for i in $(seq ${tries})
i=0
while test $i -lt $tries; do
18
19
  if xset q >/dev/null 2>&1
  then
20
    # shellcheck disable=SC2068
21
    exec Xephyr -dpi 96 -xkb-rules evdev -xkb-layout br -xkb-model abnt2 ${no_xv} ${@}
22
  fi
23
  i=$((i+1))
24
25
26
done

exit 1