HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/lib/dpkg/info/xserver-xorg-legacy.config
#!/bin/sh
# Debian x11-common package configuration script
# Copyright 2000--2003 Branden Robinson.
# Licensed under the GNU General Public License, version 2.  See the file
# /usr/share/common-licenses/GPL or <https://www.gnu.org/copyleft/gpl.txt>.

set -e

# source debconf library
. /usr/share/debconf/confmodule

THIS_PACKAGE=xserver-xorg-legacy
THIS_SCRIPT=config

CONFIG_DIR=/etc/X11
XWRAPPER_CONFIG="$CONFIG_DIR/Xwrapper.config"

allowed_users_english_to_actual () {
  case "$1" in
    "Root Only")
      echo "rootonly"
      ;;
    "Console Users Only")
      echo "console"
      ;;
    "Anybody")
      echo "anybody"
      ;;
    *)
      # garbage input; return default
      echo "allowed_users_english_to_actual(): unrecognized input \"$1\";" \
           "using default" >&2
      echo "console"
      ;;
  esac
}

allowed_users_actual_to_english () {
  case "$1" in
    "rootonly")
      echo "Root Only"
      ;;
    "console")
      echo "Console Users Only"
      ;;
    "anybody")
      echo "Anybody"
      ;;
    *)
      # garbage input; return default
      echo "allowed_users_actual_to_english(): unrecognized input \"$1\";" \
           "using default" >&2
      echo "Console Users Only"
      ;;
  esac
}

CURRENT_ALLOWED_USERS=

# scan the X wrapper config file for existing settings, if it exists
if [ -e "$XWRAPPER_CONFIG" ]; then
  if MATCHES=$(grep "^allowed_users=.\+" "$XWRAPPER_CONFIG"); then
    CURRENT_ALLOWED_USERS=$(echo "${MATCHES##*=}" | head -n 1)
  fi
fi

if [ -n "$CURRENT_ALLOWED_USERS" ]; then
  echo "setting xserver-xorg-legacy/xwrapper/allowed_users from configuration" \
       "file" >&2
  db_set xserver-xorg-legacy/xwrapper/allowed_users \
                      $(allowed_users_actual_to_english \
                      "$CURRENT_ALLOWED_USERS")
fi

db_input low xserver-xorg-legacy/xwrapper/allowed_users || test $? = 30
db_go

RET=
if db_get xserver-xorg-legacy/xwrapper/allowed_users; then
  if [ -n "$RET" ]; then
    db_set xserver-xorg-legacy/xwrapper/actual_allowed_users \
                        $(allowed_users_english_to_actual "$RET")
  fi
fi
exit 0

# vim:set ai et sts=2 sw=2 tw=0: