A good friend of mine has been kind enough to donate me a Slim Devices Squeezebox (Merci Olaf & Isabelle, je vous dois beaucoup!). Basically it a Digital to Analogue converter capable of picking up streamed music over wi-fi (or a cat 5 cable if you prefer).
You can’t just plug it in and go on your way – there is a little bit of installation work to do first! In order to stream music to the squeezebox it is necessary to set up an installation of the Squeeze Center music streaming server software to a computer somewhere on your network – it can be a Windows or Linux box – I certainly prefer Linux, because Squeeze Center is Perl based and there are options to run MySQL as a database backend; these can both be a pain to get working right on a Windows system.
Another advantage Linux has over Windows is the fairly inbuilt support for some open/GPL digital music formats such as the lossy ogg vorbis and lossless flac.
Installation
I’ll go over Squeeze Center installation on a Ubuntu server (running 8.10) in a few basic steps… First edit your sources.list file to add the Squeeze Center repository, as you may have noticed that Squeeze Center does not appear in the list of available software. Any dependencies should be taken care of.
deb http://debian.slimdevices.com stable main
Next, run apt-get and install the software…
$ sudo apt-get install squeezecenter
Once the install has completed, it should then be a case of firing up a web browser and heading to http://localhost:9000 (if not ‘localhost’, then the IP address or DNS name of the machine). If you get a nice setup page, you are done!
The Squeezebox is a breeze to set up – turn it on, and follow the on screen instructions. That’s it! Don’t forget to plug the output into a stereo amp, else you’ll not hear a lot of music…
Problems?
In the possible event of problems, Squeeze Center’s logs are actually quite helpful – they can be located here…
/var/log/squeezecenter/server.log
In order to control the Squeeze Center server, there is a start/stop/restart script located at:
/etc/init.d/squeezecenter
Some of the problems I have come across include things like Squeeze Center having issues communicating with the MySQL db server (Is MySQL installed? / Is the database set up? / Does Squeeze Center have user permissions to access the MySQL server?) or file permissions for the music you plan to let Squeeze Center have access to – as I say, the log should tell all.
Plugin Support
The Squeeze Center server comes with plugin support – there are 40 odd by default. If you live in the UK and enjoy listening to any of the radio output from the BBC (either in real-time streamed or post broadcast as an iPlayer selection then the latest version of Squeeze Center (7.2 as I write) comes with a BBC iPlayer plugin. There is also the AlienBBC plugin which enables access to other BBC realaudio live streams such as some of the local stations – handy if you like to listen to live football coverage of a lower league club for example!
Another nice plugin to enable is Last FM audio scrobbling – a good way to catalogue what you are listening to and let others know about it at the same time.
That’s the end – I am now going to spend another night with my stereo!
10 Comments on “Squeezebox plus Ubuntu is Heaven”
You can track this conversation through its atom feed.
Hi, I also love the squeeze centre, but under ubuntu, I was wondering how to get it to start automatically or at least show up in the services menu.. I guess it is about editing a text file somewhere, but being a coward I am not sure which file to edit
Posted on March 5, 2009 at 10:22 am.
Hello Richard,
The simplest thing to do is make sure that there is a certain file in the
/etc/init.d/directory calledsqueezecenter. It should look something like the following:#!/bin/sh
#
# $Id$
#
# squeezecenter initscript for squeezecenter.pl
# This file should be placed in /etc/init.d.
#
# Original Author: Mattias Holmlund
#
# Updated By: Dan Sully
#
### BEGIN INIT INFO
# Provides: squeezecenter
# Required-Start: $all
# Required-Stop: $all
# Should-Start: $all
# Should-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Startup script for the SqueezeCenter Music Server
# Description: SqueezeCenter powers the Squeezebox, Transporter and SLIMP3 network music \
# players and is the best software to stream your music to any software MP3 \
# player. It supports MP3, AAC, WMA, FLAC, Ogg Vorbis, WAV and more!
### END INIT INFO
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="SqueezeCenter Audio Server"
NAME=squeezecenter
DAEMON=/usr/sbin/$NAME-server
DAEMON_SAFE=/usr/sbin/${NAME}_safe
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
SLIMUSER=$NAME
PREFSDIR=/var/lib/$NAME/prefs
LOGDIR=/var/log/$NAME/
CACHEDIR=/var/lib/$NAME/cache
CHARSET=utf8
SLIMOPTIONS=
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
. /etc/default/$NAME
fi
#
# Function that starts the daemon/service.
#
d_start() {
# Use squeezecenter_safe to restart the daemon when
# it dies. This must be done to handle mysql restarts.
start-stop-daemon --start --quiet \
--chuid $SLIMUSER \
--pidfile $PIDFILE \
--exec $DAEMON_SAFE \
--background \
--make-pidfile \
-- \
$DAEMON \
--prefsdir $PREFSDIR \
--logdir $LOGDIR \
--cachedir $CACHEDIR \
--charset=$CHARSET \
$SLIMOPTIONS
}
d_start_direct() {
start-stop-daemon --start --quiet \
--chuid $SLIMUSER \
--pidfile $PIDFILE \
--exec $DAEMON \
-- \
--pidfile $PIDFILE \
--daemon \
--prefsdir $PREFSDIR \
--logdir $LOGDIR \
--cachedir $CACHEDIR \
--charset=$CHARSET \
$SLIMOPTIONS
}
# Function that stops the daemon/service.
#
d_stop() {
## This is a bug in the start-stop-daemon that checks the PID name from the /proc/PID/stat filesystem...
## Unfortunately this cuts-off the name of the daemon because its longer now, and then it doesnt get
## caught by the start-stop-daemon. The daemon actually reports it as squeezecenter_s instead of
## squeezecenter_safe.
start-stop-daemon -o --stop --pidfile $PIDFILE --name squeezecenter_s
}
#
# Function that sends a SIGHUP to the daemon/service.
#
d_reload() {
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
--name $NAME --signal 1
}
case "$1" in
start)
echo -n "Starting $DESC"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC"
d_stop
echo "."
;;
restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
You can then start or stop or restart SC by running (on the command line)
/etc/init.d/squeezecenter start (stop/restart). It also means that SC will start automagically the next time you restart your machine.Posted on March 5, 2009 at 11:59 am.
Much thanks for the instructions on the setup
Posted on March 21, 2009 at 3:31 pm.
This is all well and good, but what about a player for the client-side Ubuntu machine? I have this server all configured and I can access it via a browser, but I can’t play any music without specifying a player. Any suggestions?
Posted on December 31, 2009 at 10:00 am.
Hello James. From your comment I am unsure as to whether you have a squeezebox or not. I don’t know whether just setting up squeezecenter without a squeezebox player will work or not (I’ve never tried it). There is a software version of squeezebox available if: a) you have got squeezecenter server up and running, and b) you have java installed on your client machine. Go to http://squeezecenter:9000 and select ‘extras -> squeezecenter’. I quote…
Hope that helps!
Posted on January 5, 2010 at 10:40 am.
hi
i am using linux mint version 8 which is ubuntu base distro.when i try to install squeezeboxserver i get the following error:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
squeezeboxserver: Depends: mysql-server-4.1 but it is not installable or
mysql-server-5.0 but it is not going to be installed
E: Broken packages
how can i solve this?
i installed mysql-server before squeezebox server but still problem remains
Posted on February 15, 2010 at 5:13 am.
Chris, great doc. I went with ubuntu as well on an old laptop. All works except one thing; I cant STOP ubuntu from sleeping when squeezeserver is running.
Generally the laptop sleeping when inactive is just what I want. When its 30 mins after playing back music its rather annoying! Ideas anyone!?!?
Posted on February 16, 2010 at 11:16 pm.
Adam, two things come to mind regarding this problem – either of which may work!
1) Try disabling ACPI on startup
2) I believe that there is an ‘Inhibit Applet’ available in Gnome
Hopefully a Google search on either of the above will yield you an answer!
Regards
Posted on February 17, 2010 at 9:28 am.
SqueezeBox Server op Linux installeren « Flanux [We]Blog says:
[...] http://blog.chrisramsay.co.uk/2009/02/05/squeezebox-plus-ubuntu-is-heaven/ [...]
Posted on April 7, 2010 at 2:47 pm.
SqueezeBox links « Flanux [We]Blog says:
[...] http://blog.chrisramsay.co.uk/2009/02/05/squeezebox-plus-ubuntu-is-heaven/ [...]
Posted on May 16, 2010 at 10:57 am.