This is a quick and dirty README. Use at your own risk
- Install pianobar, apache2, and libapache2-mod-php5 and their dependencies
- Configure Apache2 and PHP the way you like. I followed this guide and moved my
www
folder to the home directory. - Create an
albumart
directory in the pidora server directory and make sure it's writeable by the server. - Configure pianobar until you are able to run pianobar from the command line without any interaction. The man file is particularly helpful. If you get a "TLS Handshake failed" error, run this command. It will append the correct TLS fingerprint to your config file.
- Create a FIFO file by running
mkfifo ctl
in your pidora directory. Make this writable by the server. - Edit your pianobar config file by adding the
fifo
andevent_command
variables and their location. Theevent_command
should point to the Python script. - Edit the directory location in the python script to point to the root of pidora.
- Run pianobar and open Midori to the location of pidora. You should see the song information and the album art. This should fade out with the next song. Try Loving, Banning, and Shelving a song. The appropriate message should fade in then out again.
That's it for the installation. Now let's configure our machine to automatically launch the web browser and pianobar.
- Enable the pi to automatically log in and start the x server.
- Add the following lines of code to
/etc/xdg/lxsession/LXDE/autostart
:rm /home/user/pidoraWebLocation/curSong
,@midori -a "http://localhost/pidora/" -e Fullscreen
,@pianobar
perferably with pianobar being called after Midori. This will cause Midori to launch fullscreen with pidora as the location and will start pianobar. I added it to theautostart
file in LXDE as I didn't want it to launch until the x server was up and running. It also removes the last played song from Pidora so we get a "Pianobar is starting" message if Midori beats out pianobar (hasn't happened for me). - Follow the instructions here to make the monitor not turn itself off. However, save it to the
~/.xsessionrc
instead of~/.xinitrc
. - Finally, remove all the icons on the desktop and set the statusbar to hide automatically. This isn't necessary but it gives less an impression that this is a computer.
You can shoot me an email or submit an issue at GitHub if you have a question or a suggestion. I welcome them with open arms.