I'm trying to build a singularity container for working with Microsoft Azure Kinect SDK. I need to install k4a-tools in a headless manner, but I can't figure out the right way to accept the EULA non-interactively. Originally I tried just running:
yes yes | apt -y install k4a-tools
but that seems like a messy way to do it. It did work a couple times, but now it just hangs at that part of the script.
Based on this answer I should be able to use debconf
with a command similar to:
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer
but I don't where they got the part between echo
and select
. I saw similar answers that don't explain where this syntax comes from. Some suggest also setting DEBIAN_FRONTEND=noninteractive
, but when I do that the installer quits because the EULA question can't be asked.
Another answer says that I can use debconf-show
to find the correct syntax, but debconf-show
doesn't return anything.
What is the correct way to accept an EULA from a non-interactive Bash script?