The Joy of X and Sound!

The Joy of X and Sound!


Author: Wade, Hampton
Email: whampton@staffnet.com

System Architecture: All/General
RedHat Release: All/General
FAQ Category: X Windows
Modification Date: Nov 20, 1998

Question:

How do I get sound to be associated with X events (window close, etc.)?

Answer:

If you are running FVWM2 and AnotherLevel, all you have to do is edit
a few files.  

1) Install sound on your system (out of scope of this howto),
   and a suitable audio file player (I use vplay for command line
   sound playing, but 5.x comes with /usr/bin/play from SOX).
   Test sound and make sure that all is well before messing with
   sound and X!

2) Setup sound files in:
     cd /usr/share
     mkdir sound 
     cp <files.[wav,voc,au]> sound
   or 
     ln -s <where your files are> sound

3) Edit your configuration files to associate sound with events:
     cd /etc/X11/AnotherLevel
     edit fvwm2rc.defines.m4
       change or uncomment the SOUND_COMMAND line
          define (`SOUND_COMMAND',`play')

     edit fvwm2rc.modules.m4
       attach sound to events, e.g.,

          *FvwmAudio startup computer.au

4) Restart fvwm and you should now have sound.

References:

Sound-HOWTO, Sound-Playing-HOWTO, http://www.opensound.com, 
sound-list@redhat.com, documentation in /usr/src/linux/Documentation/sound,
and sound source code in /usr/src/linux/drivers/sound!