Disable prompts while installing a Debian package

Solution 1:

Select a new front end by setting your env.

DEBIAN_FRONTEND=noninteractive apt-get -y install x11-common

I use this all the time in automating package installation with cfengine.

Solution 2:

Not having manually install x11-common, I am not sure what questions you are being asked. But if they are coming from debconf, then you should be able to pre-answer the questions with debconf-set-selections.

Solution 3:

You need to dpkg-reconfigure debconf and tell it to "Ignore questions with a priority less than: Critical".

This doesn't get you out of answering critical questions.