Home Comp/Tech Culture Politics Religion and Philosophy Creative Works

IceWM with Sound

By Ed Hurst | Jan 14, 2004 at 17:30:22

In previous articles, I’ve focused on helping users of older hardware get the most from it. While most of the FOSS world uses one of the two major desktop interfaces — KDE or Gnome — there are plenty of folks using interfaces that are less resource hungry. While it’s important to note here that hogging resources is what one pays for all the nifty automatic features found in KDE or Gnome, in reality there are few other compelling reasons to use either. While XFce is a much lighter competitor for them, the latest version (4.x) disappoints me with its lack of a sound module.

If you have a sound card and speakers, there's no reason to neglect that fuller experience that comes from a GUI that provides auditory cues for various events. My real favorite desktop/window manager is IceWM. If you've tried it, you already know whether you like it or not. One complaint I've often heard about it is that setting up the sounds associated with GUI events is really difficult. In fact, many people aren't even aware that sound is possible with IceWM. Some distributions of Open Source OSs are notorious for excluding the sound module by default.

It's possible I've missed something, but so far I've never seen instructions on this posted anywhere. In the past, my queries of the good people maintaining IceWM, as well as postings on the various forums devoted to its use, have brought a deafening silence on the topic. There are a couple of utilities to help set up sound for IceWM, but I've never gotten either of them to work on any system so far. As a non-coder, I'll be glad to admit it's probably my fault. Still, I was undeterred by this and kept searching. It's only by accident I pieced together how to get sound in IceWM.

First, about the only way you can have sound is to have compiled in the ESound interface. If your distro offers an "icewm-gnome" package, there's a good chance this has been done for you. If not, you'll have to compile it in as an option yourself. I've read discussions in the past how the authors had considered working in an Alsa interface, but at that point it was too big a chore, and they had other problems that took priority.

Compiling from source isn't so difficult as it might seem. It took about 5 minutes for me to download the 820KB for the current stable release (1.2.13) over my glacially slow dialup connection, so it shouldn't be too painful for most. I won't be giving detailed instructions on compiling, but simply outline what's required. You'll need to insure your system has the development libraries for whatever version of Gcc/Egc you are using, of course, but a few others as well:

  • Xlibs
  • imlib and imlib-config
  • png, jpeg, mng, and other graphics libs
  • gtk or gtk2

and optionally some of the Gnome development packages if Gnome is installed on your system. Since each distro tends to package Gnome differently, it would be hard to specify them. When you run the configuration script for IceWM, it will complain about what's missing. Be sure to read the INSTALLATION file at the top of the source tree for detailed instructions. When you run the configuration script, you will have to include options for "guievents" and insure that you list ESD as an option for the Icesound interface. Running ./configure --help will show you the options in good detail.

Now there are plenty of other ways to do this, but the above is likely to cover most Open Source systems. I've never gotten sound to work in IceWM without using the ESound server.

Next, you'll need to get your hands on some sounds. At one time a couple of years ago, I knew where to get specific sound theme sets for IceWM, but haven't been able to relocate them. It was in those tarballs that I discovered what names the files had to have:

  • launchApp.wav
  • restart.wav
  • shutdown.wav
  • startup.wav
  • windowClose.wav
  • windowOpen.wav
  • windowMax.wav
  • windowMin.wav
  • windowRolldown.wav
  • windowRollup.wav
  • workspaceChange.wav

It won't matter much if you don't have an official sound theme, just gather some WAV files that suit you and name them appropriately for the action indicated by the name.

Where to put them? In your home directory, as a folder in the IceWM config folder:

 ~/.icewm/sounds/

You can load them from the command line, once you have started IceWM and have the ESound server running (try esd & on the command line). Now, I'm not smart enough to make all this work properly by starting automatically when I login and run IceWM. I've tried creating an .xinitrc with all the various startup commands I like, but it's never worked for me. I simply make a command line script, and once IceWM is running, run the script to set the mouse speed, start the screensaver and ESound, load the sound events, and start the background server (recently made a separate function for IceWM):

   #!/bin/bash
   esd &
   xset m 4 2
   xscreensaver &
   icewmbg &
 icesound --interface=ESD --sample-dir=~/.icewm/sounds &

I name this script Iceup and put it in my ~/bin directory. While there are abbreviations for the Icesound options, at least once I've compiled IceWM and only spelling them out in full would work. You can learn more by typing in a terminal window:

   icesound --help

It works as you might expect with most Open Source commands. Most everything else you might want to do with IceWM is pretty well covered in the documentation.

Ed Hurst is Associate Editor of Open for Business. Ed is also the Music Director for Grace Baptist Church of Kickapoo Creek, Texas. He loves computers, runs GNU/Linux and reads all sorts of things. You can reach Ed at ehurst@ofb.biz.



Quick Access

More Articles by Ed Hurst


Share It



ADVERTISEMENT








Article Path:


Trackback URL: http://www.ofb.biz/safari/trackback/284.html Share It: Facebook Digg
Please enter your comment entry below. Press 'Preview' to see how it will look.

Name:
Location:
Homepage:
E-mail:
Subject:
:mrgreen: :neutral: :twisted: :arrow: :shock: :smile: :???: :cool: :evil: :grin: :idea: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: :!: :?:
Remember my information

The Danger of Peacemaker

By Timothy R. Butler

Here is a story. The leaders of a church have a personal agenda against someone and want to quiet him, exact revenge or what have you. They not only come at him within their church, they continue by following him outside of that church to any other church he seeks refuge at and any place he works, making a wreck of his life in the process. That is the sort of thing that only happened in the past, in dusty tales of witch-hunts in Salem or the Inquisition in Spain, right? Wrong: it is happening today, perhaps at a seemingly normal church near you.

Help Us Serve You

Open for Business strives to serve up the most interesting, relevant content possible; however, we can only do so with your help. Please take a few moments to fill out our online survey so that we can learn more about the interests of our readers, readers such as you.

Tap the Power of
Snow Leopard

Looking to get acquainted with Apple's latest operating system? Mac OS X Snow Leopard Bible, the definitive Mac OS X reference, features OFB's own Timothy R. Butler alongside Galen Gruman and Mark Hattersley.

Home About OFB RSS Feed
© 2001-2010 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.