The Perfect Media Server - Ubuntu 11.10 [Sabnzbd+/Sickbeard/Couch Potato/Headphones/Serviio] - Page 4

7. Installing Headphones

Open up a terminal window and execute the following commands.

wget -O headphones.tar.gz
tar xvf headphones.tar.gz

After the ls command, you will see something like this:

[email protected]:~$ ls
Desktop    examples.desktop   Pictures                    Templates
Documents  headphones.tar.gz  Public                      Videos
Downloads  Music              rembo10-headphones-514844e
[email protected]:~$

We want to move the rembo10-headphones-xxxxxxx to .headphones, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv rembo10-headphones-514844e .headphones
sudo mv .headphones/init.ubuntu /etc/init.d/headphones
sudo chmod +x /etc/init.d/headphones
sudo gedit /etc/init.d/headphones

Change APP_PATH to /home/user/.headphones, where user is your username, and change RUN_AS to your username, your file should then look something like this:

#! /bin/sh

# Provides:          Headphones application instance
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Headphones
# Description:       starts instance of Headphones using start-stop-daemon

############### EDIT ME ##################
# path to app

# path to python bin

# startup args

# script name

# app name

# user


############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
        echo "Starting $DESC"
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE

        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 15
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1

exit 0

Now we can set headphones to run on boot, and start it running

sudo update-rc.d headphones defaults
sudo service headphones start

You should see a message letting you know that the service has started, time to flick back to Firefox and open up the Headphones interface, the default port is 8181, so browse to http://localhost:8181 and you should see the headphones interface, if you see You're running an unknown version of Headphones. Click here to update, click the link to update, and after a little while Headphones should update and restart, You may need to hit refresh.

If headphones doesn't start back up again, go back to the terminal and restart it.

sudo service headphones start

Click settings to get to the settings page, unlike SABnzbd+ / SickBeard and Couchpotato, all the settings are on one page for Headphones.

Set a username and password for the web interface.

Enter your SABnzbd details:
SABnzbd Host name http://localhost:8080, SABnzbd username, SABnzbd password and SABnzbd API key.

For the SABnzbd Category, enter music.

For the Music download Directory enter /home/user/Downloads/complete/music replace user with your username.

Enable the Search providers you would like to use and enter the appropriate info and move down to the Quality and Post Processing section.
Leave the quality settings alone, but place tick marks against all the post processing options.

Set your Path to Destination folder: to /Media/Music, and save your changes. You are now done, you have Downloads automated, TV Shows, Movies, Music, now the final step is how to view all this content from your PlayStation 3.


8. Streaming to your PS3

There are a number of different options for streaming media to your PS3, I used to use MediaTomb, but development seems to have halted on that, so I switched to PS3MediaServer, and it is OK, but sometimes displays my shows out of order, and won't refresh the folders until i restart it which is a pain. I have recently started using Serviio, which so far seems very good. It even scrapes metadata and displays your movies by actor / director / etc. if that is your desire.

First step is downloading and installing serviio, open a terminal and type these commands:

tar xvf serviio-0.6.2-linux.tar.gz
mv serviio-0.6.2 .serviio
sudo gedit /etc/init/serviio.conf

gedit will open with serviio.conf blank document, paste the following in:

start on started networking
end script

The save your changes.

Now we can start serviio running and then open up the configuration console.

sudo start serviio

The main thing you need to do in the console is switch to the Library tab and add your folders /Media/TV Shows, /Media/Movies, /Media/Music. Make sure you add a tick against what type of content the folders contain, the Video tickbox against the Movies and TV Shows, and the Music tickbox against the Music folder. You can also tick the Retrieve Metadata checkbox if you wish, make sure you save your changes.

Then that's it, enjoy your movies, tv shows and music.

Share this page:

Suggested articles

3 Comment(s)

Add comment


By: E. de Klerk

First of all, great tutorial.

What I would like to add to this mix is Maraschino, an HTPC frontend that gives you a webbased location to monitor and control all the stuff you just installed.

More info at

By: Anonymous

Thank you so much for this guide!! It helped me a lot and it's very well written :)

By: AtariBaby

Other guides make reference to autoprocessTV.cfg and None of this needs to be done with your tutorial?