OS X 10.10 kills send to my kindle for mac. This command downloads a new version and patches it when you paste it into terminal.


wget ‘http://s3.amazonaws.com/sendtokindle/SendToKindleForMac-installer.pkg’
pkgutil –expand SendToKindleForMac-installer.pkg SendToKindleForMac-installer
LC_CTYPE=C sed -i ” ‘s/10.6.0/0/’ SendToKindleForMac-installer/buildroot.pkg/Scripts/preinstall
pkgutil –flatten SendToKindleForMac-installer SendToKindleForMac-installer-fixed.pkg
open SendToKindleForMac-installer-fixed.pkg
echo ‘done’

After a lot of tearing my hair out, I have now got a connection to the MPD server which doesn’t drop out and a stable, high quality music server pulling the music from my NAS – with a next button for the odd misstep on the playlist. Here is the code for your delectation.


Rename it to button.py and run it using python button.py. Check this post for the build details.


I’ve been playing with the very excellent Volumio.  Having got it all up and running, with a Hifiberry DAC and an LCD from http://andypi.co.uk/?p=351 it was pretty good. However, Volumio only allows for one playlist and the occasional song I was not in the mood for crept in.

So I wanted a skip to the next song button. Entirely possible with the Pi, and I found a guy who had done it – but his code wasn’t complete. Here are the full instructions:

Connect a switch to two spare gpio pins. I used GPIO 4 to ground.  This was useful.










sudo apt-get update

sudo apt-get install python-dev python-pip
sudo pip install –upgrade distribute
sudo pip install ipython
sudo pip install –upgrade RPi.GPIO

Then make a file – mine is called button py

nano button.py

This is the code

[code language="python"]

TEST_MPD_HOST = "localhost"
TEST_MPD_PORT = "6600"
TEST_MPD_PASSWORD = "volumio" # password for Volumio / MPD

# Connect with MPD
client = mpd.MPDClient()
connected = False
while connected == False:
connected = True
client.connect(TEST_MPD_HOST, TEST_MPD_PORT)
except SocketError as e:
connected = False
if connected == False:
print "Couldn't connect. Retrying"

while True:
if (GPIO.input(buttonPinNext)): # Play the next song in this play list.
print "Next track in play list"


Ctrl x to save

Download it here and change the extentio from txt to py

Test the code:

python button.py

Make it run at boot – you need to edit /etc/rc.local (as root since this is the owner).

sudo nano /etc/rc.local

At the bottom, just above exit 0 we’ll add a call to our script.

python /root/python.py

Ctrl x to save

Here is a rubbish picture of the finished article. 








Disclaimer. This may not be the worlds best Python. Please let me know if I can improve it!

25 years of the WWW

March 12th, 2014

25 years of the web today. From humble beginnings…


Just a link

November 28th, 2013

Banbury Plant & Skip Hire – new site