Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 16 lines (10 sloc) 0.233 kb
b7eac34 @falconindy auto-detect proper vt for starting X
authored
1 #!/bin/bash
2
3 shopt -s extglob
4
5 TTY=${TTY:-$(tty)}
6 TTY=${TTY#/dev/}
7
8 if [[ $TTY != tty+([0-9]) ]]; then
47f4048 @falconindy xserverrc: neaten up error msg
authored
9 printf '==> ERROR: invalid TTY\n' >&2
b7eac34 @falconindy auto-detect proper vt for starting X
authored
10 exit 1
11 fi
12
13 printf -v vt 'vt%02d' "${TTY#tty}"
14
15 exec /usr/bin/X -nolisten tcp "$vt" "$@"
Something went wrong with that request. Please try again.