fortune cookie with internal pc speaker

If you have the programmes strfile, fortune and beep, you can have fortune cookies with music coming out of your pc speaker!

Here is how it goes.

1) Create a file, say MyMusicCookies, with some beep melodies, separated by %, see for example one previous post here.

2) run
strfile MyMusicCookies MyMusicCookies.dat

3) enjoy a random music piece with
fortune MyMusicCookies | bash

You can also make a mixed file with text and beep music and let yourself be surprised!

Have fun!

UPDATE: And if you use Arch Linux, then you can activate your fortune-music player on boot by writing a file as


with a content like

Description=Set boot music

ExecStart=/usr/bin/fortune /directory/to/MyMusicCookies | /bin/bash


and activating it with

systemctl enable boot-music


Leave a Reply

Your email address will not be published. Required fields are marked *