Mp3Blaster patch for Putty

This document describes how you can use the Mp3Blaster function keys with Putty.

Written by M.Mastenbroek October 2003 / Document version 1.1 (Updated 13 december 2003)


My background.

First of all I will explain a little bit about my personal home network. The central component of this network is a FreeBSD server. This server shares the Internet connection, is a web server, ftp server and a file server (samba sharing). For example the mp3 collection of my house is concentrated on this server. The server doesnít have a graphical environment installed like X11 and there is no keyboard or monitor attached to it. There is one last important issue about this home network, almost all the clients are Windows computers.

My motivation to change the source code.

Because of the location of the mp3 collection I decided to play the music directly from the server. I placed a soundcard into the server and recompiled my kernel, after that the soundcard seems to work fine. The last thing I have to do was to find an easy to use mp3player that I could use from the command line. The idea was to control the mp3player with Putty (Windows ssh client) into a screen session. For this purpose I found Mp3Blaster, it was user friendly easy to install (Is part of the port collection of FreeBSD) and seems to work fine. But, putty didnít handle the Function keys (F1, F2 etc) correctly for Mp3Blaster. If you already worked with Mp3Blaster you should know that the function keys are an important part of Mp3Blaster. More about this problem you can read here:

Solution 1.

Before I will start talking about solution number 2 (where you must change the source code) I will first show you this alternative.
If you take over the following setting of putty most function keys will work fine.

screenshot of putty configuration.

But still some function keys will not work.

Solution 2.

The function keys in Mp3Blaster works great if you work directly from your server or you use a Unix ssh client. So what I did was changed the source code and build in a option specialy for putty. This option translate / manipulate the keyboard input from putty, it looks maybe ugly to you but it seems to be the only solution for this problem.
What you have to do is download the original source code from the website of the developer and replace the 2 source files tah I have modified.

Mp3blaster version 3.1.3
Name   Description
mp3blaster-3.1.3.tar.gz   Original source code of Mp3Blaster (version 3.1.3)
mp3blaster.h   First modified source file.   Second modified source file.

Mp3blaster version 3.2.0
Name   Description
mp3blaster-3.2.0.tar.gz   Original source code of Mp3Blaster (version 3.2.0)
mp3blaster.h   First modified source file.   Second modified source file.

After that configure, build and install the software.

make install

You can enable the 'special' putty option to start the mp3blaster as follow: 'mp3blaster -k'.
One last thing, donít change the default keyboard settings of putty, so you canít mix solution 1 and 2.

Solution 2 (Only for FreeBSD users).

Especially for FreeBSD users, copy this content and paste these lines into your console.
Before jou start, make sure your port collection is up-to-date.
Just do it and you will see that automatically Mp3Blaster including the patch will install on your system.

cd /usr/ports/audio/mp3blaster/
make deinstall clean
make extract
cd work/mp3blaster-3.2.0/src/
rm mp3blaster.h
cd /usr/ports/audio/mp3blaster/files/
cd /usr/ports/audio/mp3blaster/
make install clean

You can enable the 'special' putty option to start the mp3blaster as follow: 'mp3blaster -k'.


After I published this Mp3Blaster patch I will contact the developer of mp3blaster and I will ask him of he want to add my patch into his project.

Links to other sources
The web site of the Mp3Blaster developer.
The web site of the Putty developers.