--- console-client.old/console.c	Mon Nov 18 21:59:31 2002
+++ console-client/console.c	Thu Nov 21 19:46:38 2002
@@ -47,6 +47,11 @@ static struct mutex global_lock;
    displayed.  */
 static vcons_t active_vcons = NULL;
 
+/* Enable/disable audible bell.  */
+static int audible_bell = 1;
+
+/* Enable/disable visible bell.  */
+static int visual_bell;
 
 /* Callbacks for input source drivers.  */
 
@@ -160,9 +165,21 @@ console_exit (void)
 void console_error (const wchar_t *const err_msg)
 {
   mutex_lock (&global_lock);
-  bell_iterate
-    if (bell->ops->beep)
-      bell->ops->beep (bell->handle);
+
+  if (audible_bell)
+    {
+      bell_iterate
+	if (bell->ops->beep)
+	  bell->ops->beep (bell->handle);
+    }
+  
+  if (visual_bell)
+    {
+      display_iterate
+	if (display->ops->flash)
+	display->ops->flash (display->handle);
+    }
+  
   mutex_unlock (&global_lock);
 }
 
@@ -319,10 +336,24 @@ void
 cons_vcons_beep (vcons_t vcons)
 {
   mutex_lock (&global_lock);
+
   if (vcons == active_vcons)
-    bell_iterate
-      if (bell->ops->beep)
-	bell->ops->beep (bell->handle);
+    {
+      if (audible_bell)
+	{  
+	  bell_iterate
+	    if (bell->ops->beep)
+	      bell->ops->beep (bell->handle);
+	}
+      
+      if (visual_bell)
+	{
+	  display_iterate
+	    if (display->ops->flash)
+	      display->ops->flash (display->handle);
+	}
+    }
+  
   mutex_unlock (&global_lock);
 }
 
@@ -355,12 +386,22 @@ cons_vcons_set_scroll_lock (vcons_t vcon
 }
 
 
+
+#define OPT_AUDIBLE_BELL	1
+#define OPT_NO_VISUAL_BELL	2
+
 /* Console-specific options.  */
 static const struct argp_option
 options[] =
   {
     {"driver-path", 'D', "PATH", 0, "Specify search path for driver modules" },
     {"driver", 'd', "NAME", 0, "Add driver NAME to the console" },
+    {"audible-bell", OPT_AUDIBLE_BELL, NULL, 0,
+     "Enable audible bell (default)" },
+    {"no-audible-bell", 'a', NULL, 0, "Disable audible bell" },
+    {"visual-bell", 'i', NULL, 0, "Enable visual bell" },
+    {"no-visual-bell", OPT_NO_VISUAL_BELL, NULL, 0,
+     "Disable visual bell (default)" },
     {0}
   };
 
@@ -408,6 +449,22 @@ parse_opt (int key, char *arg, struct ar
 	}
       devcount++;
       break;
+      
+    case 'a':
+      audible_bell = 0;
+      break;
+
+    case OPT_AUDIBLE_BELL:
+      audible_bell = 1;
+      break;
+
+    case OPT_NO_VISUAL_BELL:
+      visual_bell = 0;
+      break;
+
+    case 'i':
+      visual_bell = 1;
+      break;    
 
     case ARGP_KEY_SUCCESS:
       if (!devcount)
