#!/bin/sh

# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

trap '' USR1 TTOU TTIN
# The '-noreset' works around an apparent bug in the X server that
# makes us fail to boot sometimes; see http://crosbug.com/7578.
exec nice -n -20 /usr/bin/X -noreset -nolisten tcp vt01 -auth $1 2> /dev/null

#!/bin/sh

# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

trap '' USR1 TTOU TTIN

# Disables all the Ctrl-Alt-Fn shortcuts for switching between virtual terminals
# if we're in verified boot mode. Otherwise, disables only Fn (n>=3) keys.
MAXVT=0
if crossystem "cros_debug?1" ||
    grep -q '^chronos:[^*]' /etc/shadow; then
  # developer end-user
  MAXVT=2
fi

# The '-noreset' works around an apparent bug in the X server that
# makes us fail to boot sometimes; see http://crosbug.com/7578.
exec nice -n -20 /usr/bin/X \
    -noreset -maxvt $MAXVT -nolisten tcp vt01 -auth $1 2> /dev/null

Use -maxvt flag to disable VT switching.
Use -maxvt flag to disable VT switching.

BUG=chromium:153961, chromium-os:35606
TEST=manual

Change-Id: Ica7e32e2206c2b3e9e4410dd493d8ff2e719068f
Reviewed-on: https://gerrit.chromium.org/gerrit/36315
Reviewed-by: Daniel Erat <69d56254d3d393520d06e9838c23c147a5fee7d9@chromium.org>
Tested-by: Yoshiki IGUCHI <34a0efba52c941b84ff35efd1693cf46bd9ad2c4@chromium.org>
Commit-Ready: Yoshiki IGUCHI <34a0efba52c941b84ff35efd1693cf46bd9ad2c4@chromium.org>
