diff --git a/bin/bitbake b/bin/bitbake
index 420e69d..478ac06 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -56,10 +56,11 @@ class BBConfiguration(object):
 
 
 def get_ui(config):
-    if config.ui:
-        interface = config.ui
-    else:
-        interface = 'knotty'
+    if not config.ui:
+        # modify 'ui' attribute because it is also read by cooker
+        config.ui = os.environ.get('BITBAKE_UI', 'knotty')
+
+    interface = config.ui
 
     try:
         # Dynamically load the UI based on the ui name. Although we
diff --git a/doc/bitbake.1 b/doc/bitbake.1
index aa09620..d9d3902 100644
--- a/doc/bitbake.1
+++ b/doc/bitbake.1
@@ -103,7 +103,13 @@ Show debug logging for the specified logging domains
 .TP
 .B \-P, \-\-profile
 profile the command and print a report
+
+.SH ENVIRONMENT VARIABLES
+bitbake uses the following environment variables to control its
+operation:
 .TP
+.B BITBAKE_UI
+The bitbake user interface; overridden by the \fB-u\fP commandline option.
 
 .SH AUTHORS
 BitBake was written by 
