Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a debian package and need to prompt the user for some textual details(default password, etc), as well as some one-of-many choices("Pick one of the following: foo, bar"). Will shell scripts run in dpkg use read or select correctly, or do I need another solution? If so, please point me to a quick guide about it(not necessarily noob-friendly).

share|improve this question
@UlrichDangel Could you add an asnwer so I can accept it? – hexafraction Jun 29 '12 at 18:53
@UlrichDangel A Stackoverflow meta search turns up results that they are on topic here. – hexafraction Jun 29 '12 at 19:18
up vote 6 down vote accepted

You should not use read, select or dialog yourself but use debconf instead which supports readline, dialog, gtk and even web frontends. This is much more flexible than your own system. If you are using dh for building your system it will automatically use dh_installdebconf and you'll just have to place your template in debian/package.config and don't have to adjust/modify your debian/rules file or postinst script.

For a short introduction into debconf have a look at The Debconf Programmer's Tutorial.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.