Make Your XS 0.6 System Speaker Beep Melodiously

I have an onboard sound card on the XS 0.6, but typically don’t have speakers plugged in.  What if I want audio alerts?  There’s a really fun utility called beep that lets you easily play all kinds of tones with the system speaker, if your motherboard supports that.


The source code is at http://johnath.com/beep/  I got the tarball and extracted it.

wget http://johnath.com/beep/beep-1.3.tar.gz
tar xvf beep-1.3.tar.gz

Go into the source directory.

cd beep-1.3

In the Makefile, change this line:

MAN_DIR=/usr/man/man1

To this:

MAN_DIR=/usr/share/man/man1

Now just:

make
make install

You should be all good to go with beep now:

[root@schoolserver ~]# whereis beep
beep: /usr/bin/beep /usr/share/man/man1/beep.1.gz

If you want any user from anywhere to be able to use beep:

chmod 4755 /usr/bin/beep

I googled around for fun sounds to play and found the theme to Beverly Hills Cop.  When you paste it into a script, make sure it’s all on one line.

beep -f 659 -l 460 -n -f 784 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 880 -l 230 -n -f 659 -l 230 -n -f 587 -l 230 -n -f 659 -l 460 -n -f 988 -l 340 -n -f 659 -l 230 -n -f 659 -l 110 -n -f 1047-l 230 -n -f 988 -l 230 -n -f 784 -l 230 -n -f 659 -l 230 -n -f 988 -l 230 -n -f 1318 -l 230 -n -f 659 -l 110 -n -f 587 -l 230 -n -f 587 -l 110 -n -f 494 -l 230 -n -f 740 -l 230 -n -f 659 -l 460

Block IPs in XS 0.6

I was browsing /var/log/httpd/access_log and was freaked out to see a bunch of entries like this:

77.92.85.162 – – [31/Jan/2011:13:32:34 -0600] “POST http://83.170.84.12:6667/ HTTP/1.0” 200 1511 “-” “-“
77.92.85.162 – – [31/Jan/2011:13:32:37 -0600] “CONNECT 83.170.84.12:6667 HTTP/1.0” 405 314 “-” “-“

Someone’s trying to access an IRC server from my server?  Huh?  I should probably block that.

iptables -A INPUT -s 77.92.85.162 -j DROP
service iptables save

Now when I

iptables -L

I see the new entry for the culprit:

DROP       all  —  rimmer.antycip.co.uk  anywhere

A bit of googlefu turns up that’s a well known “Problem IP.”

FYI – XS 0.6 keeps its iptables rules in this file:

/etc/sysconfig/olpc-scripts/iptables-xs