debconf seems to require a controlling TTY even when no interaction is required

Bug #551637 reported by rew
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
debconf (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: debconf

Having installed NTP on a very similar workstation I expected no interaction, so I typed:

% ssh root@falbala apt-get install ntp
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-16-generic linux-headers-2.6.32-16
Use 'apt-get autoremove' to remove them.
Suggested packages:
  ntp-doc
The following NEW packages will be installed:
  ntp
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 559kB of archives.
After this operation, 1,450kB of additional disk space will be used.
Get:1 http://nl.archive.ubuntu.com/ubuntu/ lucid/main ntp 1:4.2.4p8+dfsg-1ubuntu
1 [559kB]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 559kB in 1s (412kB/s)
Selecting previously deselected package ntp.
(Reading database ... E: Sub-process /usr/bin/dpkg received a segmentation fault
.
Of course adding "-t" on the ssh commandline works:

assurancetourix:~> ssh -t root@falbala apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-2.6.32-16-generic linux-headers-2.6.32-16
Use 'apt-get autoremove' to remove them.
Suggested packages:
  ntp-doc
The following NEW packages will be installed:
  ntp
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 0B/559kB of archives.
After this operation, 1,450kB of additional disk space will be used.
Selecting previously deselected package ntp.
(Reading database ... 143304 files and directories currently installed.)
Unpacking ntp (from .../ntp_1%3a4.2.4p8+dfsg-1ubuntu1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up ntp (1:4.2.4p8+dfsg-1ubuntu1) ...
 * Starting NTP server ntpd [ OK ]

Connection to falbala closed.
---

but I don't think that debconf should complain/fail and cause dpkg to crash if it doesn't need to ask me anything.

Ubuntu Lucid.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in debconf (Ubuntu):
status: New → Confirmed
Revision history for this message
Richard Elkins (texadactyl) wrote :

This bug is almost 8 year old. Any interest in fixing it?

Revision history for this message
rew (r-e-wolff) wrote :

```
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
'''

Revision history for this message
rew (r-e-wolff) wrote :

I tried it again:
  assurancetourix:~> ssh falbala sudo apt install ntp

and this time I got... What's in the previous comment. (I looked for a "preview" button to see if I got the "quoted text" right. Expecting to be able to edit, and not finding the preview, I clicked subit. Now I can't find the "edit" either. Sorry.... )

So.... It seems the bug mostly got fixed in the past 8 years. At least for me it did

Revision history for this message
dino99 (9d9) wrote :

#3 output should be fixed (if 'proposed' is activated) by:

Fixed by:

software-properties (0.96.24.22) bionic; urgency=medium

  * software-properties-gtk: Depend on libgtk3-perl for debconf's GNOME
    backend. Drop previous Recommends on libgtk2-perl. (LP: #1679784)

 -- Jeremy Bicha <email address hidden> Thu, 01 Mar 2018 21:34:59 -0500

and you still can set your wish with 'sudo dpkg-reconfigure debconf' (for example, select 'gnome')

Revision history for this message
dino99 (9d9) wrote :

note: #5 comment is about Bionic archive.

Revision history for this message
Richard Elkins (texadactyl) wrote :

I found a fix that works for me:
`export DEBIAN_FRONTEND=noninteractive`

I execute that just prior to any debconf steps.
E.g. I use this on my headless systems around my home:

export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -y dist-upgrade
apt-get -y autoclean
apt-get -y autoremove

Changed in debconf (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
rew (r-e-wolff) wrote (last edit ):

I just tried the command in the opening "comment" again and indeed it now works. (the machine was reinstalled since 2010 and didn't get NTP until just now).

P.S. Feel free to mark it as "fixed" !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.