Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (10 sloc) 233 Bytes
#!/bin/bash
shopt -s extglob
TTY=${TTY:-$(tty)}
TTY=${TTY#/dev/}
if [[ $TTY != tty+([0-9]) ]]; then
printf '==> ERROR: invalid TTY\n' >&2
exit 1
fi
printf -v vt 'vt%02d' "${TTY#tty}"
exec /usr/bin/X -nolisten tcp "$vt" "$@"
Something went wrong with that request. Please try again.