You can use debconf-set-selections
to preseed settings for such configuration scenes. First, on a system on which the package has been installed and configured, run:
debconf-get-selections | grep x11-common
This will tell you the selection identifiers (the name of the package, which you know, and the name and type of the question) you need in case you want to manually set them. In this case, the output would be something like:
x11-common x11-common/xwrapper/allowed_users select Anybody
x11-common x11-common/xwrapper/actual_allowed_users string anybody
Then you can do, on a system on which x11-common
is yet to be installed, you can:
ssh first-system 'debconf-get-selections | grep x11-common' |
sudo debconf-set-selections
Or, manually:
sudo debconf-set-selections <<EOF
x11-common x11-common/xwrapper/allowed_users select Anybody
x11-common x11-common/xwrapper/actual_allowed_users string anybody
EOF
Then, you can install x11-common
and expect it use this setting while configuration:
sudo DEBIAN_FRONTEND=noninteractive apt-get install x11-common
debconf-get-selections | grep x11-common
say?debconf/x11-common
?man dpkg-reconfigure
: Note that if you normally have debconf set to use the noninteractive frontend, dpkg-reconfigure will use the dialog frontend instead, so you actually get to reconfigure the package.x11-common x11-common/xwrapper/allowed_users select Console Users Only x11-common x11-common/xwrapper/actual_allowed_users string console
debconf-set-selections
.