fix debconf warning mesages in emacs
[distro-setup] / .bashrc
diff --git a/.bashrc b/.bashrc
index 067782edfcf92bdada68956f5ba39960b099cdee..e8651b544b641d15e6836f43170fe7f5630450d6 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -86,6 +86,14 @@ if [[ $- == *i* ]]; then
         export PAGER=cat
         export MANPAGER=cat
         stty echo
+        # debconf occasionally spews messages about wanting to initialize dialog
+        # and falling back to readline, since our terminal is dumb, then does nothing,
+        # This is a long standing bug. Here is the fix.
+        if [[ $DISPLAY ]]; then
+            export DEBIAN_FRONTEND=gnome
+        else
+            export DEBIAN_FRONTEND=readline
+        fi
     else
         stty werase undef lnext undef stop undef start undef
         # terminal keys: C-c, C-z. the rest defined by stty -a are, at least in