--- rxvt-2.6.4.orig/src/main.c
+++ rxvt-2.6.4/src/main.c
@@ -1010,6 +1010,9 @@
 
 	TermWin.fwidth = fw;
 	TermWin.fheight = fh;
+	TermWin.fascent = TermWin.font->ascent;
+	TermWin.fdescent = TermWin.font->descent;
+	TermWin.fontdiff = 0;
     }
 
 /* check that size of boldFont is okay */
@@ -1035,10 +1038,17 @@
 	    int             fh, fw;
 
 	    fw = get_fontwidest(TermWin.mfont);
-	    fh = TermWin.mfont->ascent + TermWin.mfont->descent;
-	    if (fw <= TermWin.fwidth && fh <= TermWin.fheight)
-		/* WHAT TO DO!! */ ;
-	    TermWin.mprop = !(fw == TermWin.fwidth /* && fh == TermWin.fheight */ );
+	    if (TermWin.mfont->ascent > TermWin.fascent) {
+		TermWin.fascent = TermWin.mfont->ascent;
+		TermWin.fontdiff = 1;
+	    }
+	    if (TermWin.mfont->descent > TermWin.fdescent) {
+		TermWin.fdescent = TermWin.mfont->descent;
+		TermWin.fontdiff = 1;
+	    }
+	    if (TermWin.fontdiff)
+		TermWin.fheight = TermWin.fascent + TermWin.fdescent;
+	    TermWin.mprop = (fw != TermWin.fwidth * 2);
 	}
 #endif
 
@@ -1144,10 +1154,9 @@
 /*
  * Open display, get options/resources and create the window
  */
-    if ((rs[Rs_display_name] = getenv("DISPLAY")) == NULL)
-	rs[Rs_display_name] = ":0";
+    rs[Rs_display_name] = getenv("DISPLAY");
 #ifdef LOCAL_X_IS_UNIX
-    if (strncmp(rs[Rs_display_name], ":0", 2) == 0)
+    if (rs[Rs_display_name] && strncmp(rs[Rs_display_name], ":0", 2) == 0)
 	rs[Rs_display_name] = "unix:0";
 #endif
 
@@ -1156,9 +1165,13 @@
     FREE(r_argv);
 
     if ((Xdisplay = XOpenDisplay(rs[Rs_display_name])) == NULL) {
-	print_error("can't open display %s", rs[Rs_display_name]);
+	print_error("can't open display %s",
+			rs[Rs_display_name]?rs[Rs_display_name]:
+			"as no -display option given and DISPLAY not set");
 	exit(EXIT_FAILURE);
     }
+    if (rs[Rs_display_name] == NULL)
+        rs[Rs_display_name] = XDisplayString(Xdisplay);
 #ifdef INEXPENSIVE_LOCAL_X_CALLS
     /* it's hard to determine further if we're on a local display or not */
     display_is_local = rs[Rs_display_name][0] == ':' ? 1 : 0;
@@ -1348,6 +1361,16 @@
 	sprintf(env_term, "TERM=%s", rs[Rs_term_name]);
 	putenv(env_term);
     } else {
+	/* Debian hack: We at Debian prefer to be correct.  Therefore, we
+           use TERM=rxvt on color displays and TERM=rxvt-m (the -m stands
+           for monochrome, see terminfo(5)) on monochrome displays.  For
+           some unknown reason, the upstream maintianers don't recognize
+           the usefulness of this.  Oh well. */
+#ifndef KANJI
+	if (Xdepth <= 2)
+	    putenv("TERM=" TERMENV "-m");
+	else
+#endif
 	putenv("TERM=" TERMENV);
     }
 }
