Categotry Archives: Music


Getting the subsonic server to work in Linux with a Roku media player


Yeah this required 3 hours of futzing to figure out.

1. Once you have the Subsonic Server installed, turn it off.

sudo service subsonic stop

2. Next change to the /var directory.

Remember anything with an octothorpe (#) is a comment and NEED not be coded.

cd /var # change to the /var
sudo mv subsonic subsonic.old # renames the existing folder
sudo service subsonic start # restart the subsonic server

3. Now we have to create a symbolic link for the lame transcoder, even if it is already installed.

To verify if lame is installed:

dpkg -l | grep lame

You would get output that looks like:

nwayno@Homer:~$ dpkg -l | grep lame
ii lame 3.98.4-0ubuntu1 An MP3 encoding library (frontend)
ii libmp3lame0 3.98.4-0ubuntu1 An MP3 encoding library
ii libtwolame0 0.3.12-1 MPEG Audio Layer 2 encoding library
ii twolame 0.3.12-1 MPEG Audio Layer 2 encoder (command line frontend)

If lame is NOT installed (the dpkg just returns a prompt) — install the lame decoder:

sudo apt-get install lame

as you can see, mine WAS installed.

4. Go back to localhost:4040 and re-enter all the information. If it complains that lame is not installed in the transcode directory, simply create a symbolic link.

which lame

should return:


5. so off we go again!

sudo service subsonic stop # stop the subsonic server
cd /var/subsonic/transcode # change back to the transcode dir
sudo ln -s /usr/bin/lame # create the symlink
sudo service subsonic start # start up the server so it gets change

it will just return a prompt.

to confirm the symbolic link is there:

ls -l

and you should get output that looks like:

lrwxrwxrwx 1 root root 13 2012-02-01 15:10 lame -> /usr/bin/lame

which tells us that /usr/bin/lame is properly symlinked.

6. Now you can proceed to the Roku Box, and configure Subsonic TV.

Please note that subsonictv for Roku is not free. It is currently $5 USD plus applicable taxes.

The configuration will now save correctly on the Roku set top box, because it can now find the lame mp3 decoder.

Tested with Ubuntu 10.10 (64 bit), and Roku Model 2100X (hardwired)



What folder do you use to add music to a Samsung Restore?


No place on the internet, have I found the location to add your own music, to a Samsung Restore Cell Phone. Till now. While this is Linux oriented, the same location would be used in Windows.

It goes into the Downloads folder. (Yes. Spelled “Downloads” with a capital D!)

1. Copy your music from your source, to this folder. Yes you can have embedded folders. Mine is called: “The Moody Blues”

You can use nautilus to create the folder, or mkdir from the command line. In Windows, you would use the File Manager.

Virgin Mobile Music Folder

Virgin Mobile Music Folder Location

You will notice that my microsd is labelled WAYNOSVMFON. You can do this with gparted. Note that the microsd is formatted as vfat. Debian has some issues auto-mounting vfat partitions, so you may need to manually mount it.

sudo mount /dev/sdxx /mnt

where xx is the device name (hint: use sudo blkid to get that)

You will notice that when you use the media player, that a file in (yup, remember this is windows) is created called:

Virgin Mobile Music Key File

Virgin Mobile Music Key File


The file seems to contain some random 4 digit number.

You may also notice a folder called “music” That’s NOT where you put the music. BUT, you will find the file: playlist.mdb Yup, that’s a Microsoft Database file.

Oops! Added an SONG you no longer want? Want to make it disappear? Sort of easy. This is how you do it from the phone itself.

1. Select the LEFT Menu button.

2. Go to Tools and Settings.

3. Select Tools.

4. Mass Storage.

5. File Manager.

6. Memory Card

7. Downloads folder.

8. Open the Folder that your music is in, then the sub-folder within that contains the song you to delete, and finally the song. Nope it will NOT let you just delete the folder, if it contains files. You must delete the contents of the folder, one at a time.

9. Options Button (right button)

10. Delete

Enjoy your music!



How to get Linux to recognize your mp3 player


This is a question I see repeatedly on #ubuntu (

The answer is simple, yet complex.

Most mp3 players are setup to use Windows Media Transport Protocol (MTP). That works great if you use Windows.

But how do you get it to work with Linux? The easy way is to change the usb mode on your mp3 player from MTP, to MSC mode. (USB mass-storage class device). That will make the mp3 player look like a usb flash drive. Then it’s a simple matter of drag and drop.

The tricky part, is figuring out HOW to change this setting on your device. I don’t know if the Apple Ipod will do this.

I have a Sandisk Sansa Fuse mp3 player, and it works well with Linux.

To change to msc mode on that I did:

1. Settings

2. System Settings

3. USB Mode

4. Change to MSC!

Power off. Turn it on, plug it in, and it will now look like a USB Flash Drive.

When you are done writing to your mp3 player, flash drive, flash media (sdhc), it’s a good idea to ensure all the data is written. Go to a terminal and enter:


The sync command, flushes all the buffers and writes them to the devices. This ensures that all data is written to a device. It’s a good practice go get into, especially when dealing with flash drives, mp3 players, or flash media (sdhc camera cards).

I haven’t quite figured out how to convert videos. Yet! When I do, I’ll let you know!

As, always YMMV applies.



How to convert or play midi files to wav files in Ubuntu/Debian


Courtesy Loni:

Timidity will play midi files quite nicely, and also output to a variety of formats. To play and output to a wav file:

timidity mymusic.mid -Ow -o mymusic.wav

UPPERCASE O (OH!) = output mode, lowercase ‘w’ (for wav file), then
lowercase o (oh) = output filename.

There are other options available too, specifying stereo/mono output, and much more. timidity -h is quite readable, the man page is more convoluted.

For stereo wav:

timidity mymusic.mid -OwS -o mymusic.wav

(be careful of the case of both the O’s (OH’s!) and the options for the mode O (uppercase). wav format = ‘w’ (lower), stereo = ‘S’ (upper)

Easily scriptable as something akin to:
(in your midi subdirectory, of course)

for f in *.mid; do
timidity "$f" -Ow -o "${f%.mid}.wav"

(umm, the %.mid bit only works with bash > v7.00)

I suppose I should do it pre-bash 7 too:

for f in *.mid; do
timidity "$f" -Ow -o "$(basename $f .mid).wav"

(not as pretty as the former, but still works!)

Hope this helps


Thanks Loni


installing ubuntu-restricted-extras under wubi


From: Jose B 28 April at 01:49

When installing Linux on your Windows machine using Wubi, your Linux installation will not have access through the synaptic package manager to the Ubuntu Restricted Extras; also you will not be able to install them through the web page either.

What I did to get around this is:

1. I opened the terminal (Applications-Accessories-Terminal)
2. At the prompt type: $ sudo aptget ubuntu-restricted-extras
– This will install the restricted extras packages
3. type: sudo /usr/share/doc/libdvdread4/
– This will install dvd support to your linux system that was installed through Wubi

Now you will have a fully functional Linux system. This was tried on a Windows 7 machine.


Getting Amarok to work under gnome


1. Okay the first thing we want to do, if not done so all ready is to install the “ubuntu-restricted-extras” using the synaptic package manager.
(System/Administration/Synaptic Package Manger)

2. Once that is done, go to terminal mode and type:
(this is so we can download from the experimental amarok site)

sudo apt-key adv –recv-keys –keyserver 0xf3c48cb3011fa791d74acaac60487016493b3065


sudo apt-key adv –recv-keys –keyserver 493B3065 # all one line!

3. Now we can proceed to the next step — adding a repository.

Go to Synaptic Settings/Repositories/Third Party Software and add:
(this is so we can get the latest beta release: 2.0.90

deb jaunty main

4. Hit “Reload”

5. Exit out of Synaptic.

6. If amarok is running, quit it.

7. Go to terminal mode and type:

sudo apt-get install libxine1-ffmpeg
(this gets the xine mpeg codecs)

sudo apt-get install amarok
(this will install latest version of amarok over the top of what’s already there)

if you get things like:

Unknown media type in type ‘all/all’
Unknown media type in type ‘all/allfiles’
Unknown media type in type ‘uri/mms’
Unknown media type in type ‘uri/mmst’
Unknown media type in type ‘uri/mmsu’
Unknown media type in type ‘uri/pnm’

That’s okay…

8. And if we did our homework right, you should be able to fire up amarok (under gnome) and it should be able to play mp3’s!

9. Side effect of running KDE apps under gnome: it will launch the KDE “cache cleaner” every so often. Known bug. Doesn’t hurt anything, but it’s a known problem, and it is annoying.

10. If you bring up amarok, and it crashes, it’s a beta – quit out and try again. I had to try a few times before it loaded. (audio scrobbler) is a tad flakey — this is a beta. And the equaliser has been removed….