diff -Naur rxvt-2.7.3/AZZ-ChangeLog rxvt-2.7.3-azz4/AZZ-ChangeLog
--- rxvt-2.7.3/AZZ-ChangeLog	Thu Jan  1 01:00:00 1970
+++ rxvt-2.7.3-azz4/AZZ-ChangeLog	Mon May 20 22:55:44 2002
@@ -0,0 +1,7 @@
+- Modified to support borderlessness with -nb and override-redirect with
+  -or (or resources borderless and overrideRedirect).
+- Modified to allow an arbitrary command to be run instead of the bell
+  with -bc.
+- Fixed buffer overflow in command.c (not that you should install this suid
+  root anyway)
+
diff -Naur rxvt-2.7.3/src/command.c rxvt-2.7.3-azz4/src/command.c
--- rxvt-2.7.3/src/command.c	Fri Jan 14 05:05:03 2000
+++ rxvt-2.7.3-azz4/src/command.c	Mon May 20 23:07:45 2002
@@ -1426,7 +1426,8 @@
     unsigned char   buf[256];
 
     va_start(arg_ptr, fmt);
-    vsprintf(buf, fmt, arg_ptr);
+    /* Modified azz 20010617 to avoid buffer overflow below. */
+    vsnprintf(buf, sizeof buf, fmt, arg_ptr);
     va_end(arg_ptr);
     tt_write(buf, STRLEN(buf));
 }
diff -Naur rxvt-2.7.3/src/init.c rxvt-2.7.3-azz4/src/init.c
--- rxvt-2.7.3/src/init.c	Sun Mar 26 08:47:01 2000
+++ rxvt-2.7.3-azz4/src/init.c	Mon May 20 23:06:29 2002
@@ -34,6 +34,7 @@
 #include "../config.h"		/* NECESSARY */
 #include "rxvt.h"		/* NECESSARY */
 #include "init.h"
+#include <Xm/MwmUtil.h>
 
 static ttymode_t tio;
 
@@ -766,6 +767,24 @@
 					 PixColors[Color_border],
 					 PixColors[Color_fg]);
 #endif
+    if (Options & Opt_borderless) {
+      Atom mwmatom;
+      MotifWmHints hints;
+
+      mwmatom = XInternAtom(Xdisplay, _XA_MOTIF_WM_HINTS, FALSE);
+      hints.flags = MWM_HINTS_DECORATIONS;
+      hints.decorations = 0;
+      XChangeProperty(Xdisplay, TermWin.parent[0], mwmatom, mwmatom,
+        32, PropModeReplace, (unsigned char *)&hints, 
+        sizeof(MotifWmHints)/sizeof(long));
+    }
+    if (Options & Opt_overrideredirect) {
+      XSetWindowAttributes attrib;
+
+      attrib.override_redirect = True;
+      XChangeWindowAttributes(Xdisplay, TermWin.parent[0],
+                              CWOverrideRedirect, &attrib);
+    }
     xterm_seq(XTerm_title, rs.title);
     xterm_seq(XTerm_iconName, rs.iconName);
 /* ignore warning about discarded `const' */
@@ -897,7 +916,7 @@
  * We don't want them, we don't need them.
  */
     for (i = 0; i < num_fds; i++) {
-	if (i == STDERR_FILENO || i == cfd || i == tty_fd || i == Xfd)
+	if (i == STDERR_FILENO || i == STDOUT_FILENO || i == cfd || i == tty_fd || i == Xfd)
 	    continue;
 	close(i);
     }
diff -Naur rxvt-2.7.3/src/rxvt.h rxvt-2.7.3-azz4/src/rxvt.h
--- rxvt-2.7.3/src/rxvt.h	Sun Feb 27 04:57:52 2000
+++ rxvt-2.7.3-azz4/src/rxvt.h	Mon May 20 22:54:18 2002
@@ -448,6 +448,8 @@
 #define Opt_scrollTtyOutput	(1LU<<11)
 #define Opt_scrollKeypress	(1LU<<12)
 #define Opt_transparent		(1LU<<13)
+#define Opt_borderless          (1LU<<14)
+#define Opt_overrideredirect    (1LU<<15)
 /* place holder used for parsing command-line options */
 #define Opt_Reverse		(1LU<<30)
 #define Opt_Boolean		(1LU<<31)
@@ -568,6 +570,8 @@
  		   *scrollBar_floating,
  		   *scrollTtyOutput,
  		   *scrollKeypress,
+                   *borderless,
+                   *overrideRedirect,
  		   *saveLines,
  		   *utmpInhibit,
  		   *visualBell,
@@ -603,7 +607,8 @@
 		   *int_bwidth,
 #endif
 		   *cutchars,
-		   *modifier;
+		   *modifier,
+		*bellcommand;
 } resource_list;
 
 /*
diff -Naur rxvt-2.7.3/src/screen.c rxvt-2.7.3-azz4/src/screen.c
--- rxvt-2.7.3/src/screen.c	Wed Feb 23 05:13:36 2000
+++ rxvt-2.7.3-azz4/src/screen.c	Mon May 14 16:57:40 2001
@@ -29,6 +29,7 @@
 #include "screen.intpro"	/* PROTOS for internal routines */
 
 #include <X11/Xmd.h>		/* get the typedef for CARD32 */
+#include <stdlib.h>
 
 /* ------------------------------------------------------------------------- */
 static char     charsets[4];
@@ -2020,6 +2021,9 @@
 void
 scr_bell(void)
 {
+	if (rs.bellcommand) {
+		system(rs.bellcommand);
+	} else {
 #ifndef NO_BELL
 # ifndef NO_MAPALERT
 #  ifdef MAPALERT_OPTION
@@ -2030,9 +2034,11 @@
     if (Options & Opt_visualBell) {
 	scr_rvideo_mode(!rvideo);	/* scr_refresh() also done */
 	scr_rvideo_mode(!rvideo);	/* scr_refresh() also done */
-    } else
-	XBell(Xdisplay, 0);
+    } else {
+		XBell(Xdisplay, 0);
+	}
 #endif
+    }
 }
 
 /* ------------------------------------------------------------------------- */
diff -Naur rxvt-2.7.3/src/xdefaults.c rxvt-2.7.3-azz4/src/xdefaults.c
--- rxvt-2.7.3/src/xdefaults.c	Sat Mar 11 05:14:50 2000
+++ rxvt-2.7.3-azz4/src/xdefaults.c	Mon May 20 22:54:55 2002
@@ -105,6 +105,8 @@
 	 "scroll-on-tty-output inhibit"),
     BOOL(rs.scrollKeypress, "scrollTtyKeypress", "sk", Opt_scrollKeypress,
 	 "scroll-on-keypress"),
+    BOOL(rs.borderless, "borderless", "nb", Opt_borderless, "use MWM hints to remove the window border"),
+    BOOL(rs.overrideRedirect, "overrideRedirect", "or", Opt_overrideredirect, "set the override_redirect flag"),
 #ifdef TRANSPARENT
     BOOL(rs.transparent, "inheritPixmap", "ip", Opt_transparent,
 	 "inherit parent pixmap"),
@@ -265,6 +267,8 @@
 #ifdef CUTCHAR_RESOURCE
     RSTRG(rs.cutchars, "cutchars", "string"),
 #endif				/* CUTCHAR_RESOURCE */
+    STRG(rs.bellcommand, "bellcommand", "bc", "string",
+	"command to execute instead of beeping"),
     INFO("e", "command arg ...", "command to execute")
 };
 

