If you want to get your terminal bell (beep) to work on a system without a PC speaker, or want to play a custom sound through your sound card, you can use the Fancy Beeper Daemon.
In order to get it to compile on intrepid, I had to tweak the includes. Here is a patch for beep.c: beep.c.pat
After you apply the patch, run install.sh to compile and install the kernel module.
The permissions on /dev/beep will probably not let you access it (unless you are root). To fix this, place the following file in /etc/udev/rules.d: 41-beep.rules. This will create /dev/beep with group audio (you will need to make sure you are in the audio group).
You can now rmmod beep; modprobe beep. You probably want to add beep to /etc/modules so that it gets installed when booting.
You will need to run a daemon to do something useful when a beep occurs. I am running the included daemons/beepd_esd.pl. You will need to edit it to point to a valid wav file.
You can test your beep with: echo -e "\a"
I set up the daemon to run automatically via Sessions->Startup Programs (doesn't seem to work in /etc/rc.local).
If you are running screen, the visual bell may be on by default (which turns off the audible bell). To turn it on hit Ctrl+a Ctrl+g. If you want it this way every time you run screen, add "vbell off" to you .screenrc.
In irssi you can run the following command to have it beep on certain events (such as when your nick is mentioned):
You can also place these settings in you .irssi/config
settings = {
"fe-common/core" = {
bell_beeps = "yes";
beep_msg_level = "MSGS NOTICES DCC DCCMSG HILIGHT";
};
};
You may want to only have the terminal bell enabled for certain things (i.e. irssi). You can do this with profiles. You can start gnome-terminal with a specific profile by adding --window-with-profile=PROFILENAME
To run a command use -x, which will treat the remainder of the line as a command to run in the terminal, i.e. gnome-terminal --window-with-profile=PROFILENAME -x screen -r
To ssh to a remote machine and run screen using a particular profile in gnome-terminal use: gnome-terminal --window-with-profile=PROFILENAME -x ssh -t remote.machine screen -r
Some (possibly) helpful links: