Return-Path: xerox.com!exmh-workers-request.PARC
Received: from alpha.xerox.com ([13.1.64.93]) by palain.parc.xerox.com with SMTP id <149>; Fri, 8 Jul 1994 23:06:15 -0700
Received: from mu.parc.xerox.com ([13.2.116.81]) by alpha.xerox.com with SMTP id <14411(6)>; Fri, 8 Jul 1994 23:06:08 PDT
Received: from alpha.xerox.com ([13.1.64.93]) by mu.parc.xerox.com with SMTP id <58395>; Fri, 8 Jul 1994 23:05:35 -0700
Received: from CANTVA.CANTERBURY.AC.NZ ([132.181.30.3]) by alpha.xerox.com with SMTP id <14439(1)>; Fri, 8 Jul 1994 23:05:07 PDT
Received: from phys.canterbury.ac.nz by csc.canterbury.ac.nz
 (PMDF V4.3-8 #7295) id <01HEIFCO9ADSAR9QVR@csc.canterbury.ac.nz>; Sat,
 09 Jul 1994 18:04:53 +1200
Received: by phys.canterbury.ac.nz (5.0/SMI-SVR4) id AA22885; Sat,
 9 Jul 1994 18:04:46 --1200
Date:	Fri, 8 Jul 1994 23:04:45 -0700
From:	Andrew Richards <physajr@phys.canterbury.ac.nz>
Subject: Re: new mail sound
To:	exmh-workers@parc.xerox.com
Message-id: <9407090604.AA22885@phys.canterbury.ac.nz>
X-Envelope-to: exmh-workers@parc.xerox.com
MIME-version: 1.0
X-Mailer: exmh version 1.4 6/24/94
Content-type: multipart/mixed ; boundary=boundary-0
Content-transfer-encoding: 7BIT
Content-length: 2451

This is a multipart MIME message.

--boundary-0
Content-Type: text/plain
--------

The following is the solution I came up with to the problem those of us with 
practically mute xterminals have when new mail arrives. ie no audio 
notification

It's pretty simple but it works for me running Solaris 2.3 and will probably 
work for you.

All you have to do is set the audio-play command to the path of xbell 
(attached) and set the sound for new messages to 3 (say) and the xserver will 
beep 3 times when new mail arrives.


=====================================================================
|  Andrew Richards                              Physics Department  |
|                                                   Canterbury      |
| E-Mail:  A.Richards@phys.canterbury.ac.nz        New  Zealand     |
|-------------------------------------------------------------------|
|            WANTED:  Schrodinger's cat, dead or alive.             |
=====================================================================

--boundary-0
Content-Type: text/plain; name="xbell.c"
Content-Description: xbell.c

/* xbell - a program to ring the bell on an xterminal                        */
/*                                                                           */
/* written by Andrew Richards (A.Richards@phys.canterbury.ac.nz) 9 July 1994 */
/*                                                                           */
/* Syntax: xbell number-of-beeps                                             */
/*                                                                           */
/* Compile with:                                                             */
/* cc -I/usr/local/X11/include xbell.c -L/usr/local/X11/lib -lX11 \          */
/*    -R/usr/local/X11/lib -lsocket -o xbell                                 */
/*                                                                           */
/* under SOLARIS 2.3 and similar for most others I would imagine             */

#include <X11/Xlib.h>

main(int argc, char **argv)
{
  int cnt,number=3;
  Display *display;

  if ((argc>1) && ((number = atoi(argv[1]))>0)) {
    if ((display = XOpenDisplay(NULL)) == NULL) {
      printf("Couldn't open display %s\n", XDisplayName(display));
      exit (-1);
    }

    for(cnt=0;cnt<number;cnt++) {
      XBell(display,100);
    }

    XCloseDisplay(display);
  }
  else {
    printf("Syntax: %s <number of beeps>\n",argv[0]);
  }
}

--boundary-0--

