Get free shipping within Australia on any order over $1000.

Play Star Wars “Imperial March” on an APU

What better way to celebrate the fourth of May, than with this tutorial that shows you how to play “The Imperial March” theme from Star Wars on our APU single board computer?

Lego Star Wars Darth VaderFollow along step-by-step to create a musical server that’s sure to impress any Star Wars fan.

Note: This script can be used on any PC with a speaker to create the same effect.

Instructions

Step 1. Create a bootable USB drive

Create a bootable USB drive for the APU.

> How to create a bootable USB drive for the APU

Step 2. Connect to the serial console

Connect to the serial console and boot your APU using your newly-created USB stick.

> Connecting to the serial console on your headless device

Step 3. Install the “beep” package

At the console, type:

remountrw
apt-get update
apt-get install beep

Step 4. Set up the Star Wars music file

Copy the file starwars.bpy (see below) onto the USB stick using scp, or use vi to create the file locally.

To create the file using vi, type:

vi starwars.bpy

To go into insert mode, type:

i

Paste the contents of the starwars.bpy file, by copying it to your paste buffer and using ‘right click’ or ALT+V.

To exit insert mode, press:

Esc

To save and quit the editor, type:

wq

Step 5. Finish the configuration

Change the execution flags on the file to make it executable:

chmod +x starwars.bpy

Lastly, change the operating system back into read-only mode:

remountro

Step 6. Play the tune

To play the tune, go to the directory where you created the starwars.bpy file, and type:

./starwars.bpy

You should get something like this:

You’re welcome!

And may the force be with you.

Resources

starwars.bpy

Adapted from: http://zeldor.biz/2010/08/star-wars-anthem-pc-speaker/

Want more great articles like this?

Sign up for email updates and get them delivered straight to your inbox.

We'll also donate $5 to Voyage Linux, to support the ongoing development of this fantastic software.

Share your thoughts