Home » Featured, Hacks, Headline

[How-to] Play music from a remote machine

4 April 2012Entry by

Just yesterday, I was on my way home. Usually, I listen to the music while out on the street, but my audio player wasn’t with me and it’s been a while since I have uploaded any fresh music into my N900. Luckily, I had all my music on my home PC (which was conveniently running) and with an N900, I sure can access and listen to it. Want to know how? I’ll show you in this guide.

This guide assumes the machine you’re connecting to runs a *nix system (GNU/Linux, BSD, MacOS). For getting SSH up with Windows, refer to this guide by Lifehacker.

First things first, you would want to have SSH running on your machine with the music. Make sure you start it and have the SSH port unlocked on the machine.

If you are unsure how to do that, see this guide for Ubuntu, which will work for most other GNU/Linux distros with minor changes, or refer to your system’s documentation.

Obviously, you also need OpenSSH on your N900, which you can get with

sudo gainroot

apt-get install openssh

if you don’t have it already. Now, let’s look at the methods you can use to start playing music from a remote machine on your N900.

You can use MPlayer + SSH. This is a faster, but a slightly inconvenient way, for which you need MPlayer on your N900.

If you don’t have it, get it with

sudo gainroot

apt-get install mplayer

Then, you can use this command:

ssh <user>@<remote-address> “cat <full-path-to-file>” | mplayer -

Where <user> is your username on the machine, <remote-address> is your machine’s IP address and <full-path-to-file> is the full path to the file you want to play.

The inconvenience of this is that you won’t be able to play many files at once and you’ll have to use the full path to the file.

A better method is sshfs. Again, if you don’t have sshfs, grab it with

sudo gainroot

apt-get install sshfs

Create a directory, which you’ll use (as root):

mkdir /home/user/Home-PC

Finally, mount your machine’s filesystem on that directory with sshfs:

sshfs <user>@<remote-address>: /home/user/Home-PC

There, you can now access the whole home directory of your home PC via /home/user/Home-PC and that means (besides other files) you can also access your music and play it with any desired player app. If your music is in a directory other than your home one, specify it after the colon, for example:

sshfs <user>@<remote-address>:/some/music/directory /mnt/Home-PC


Now you know how you can listen to your remote music with your N900. Sure, simply uploading the music to your N900 is ideal, but sometimes you don’t want to have it, you don’t want to waste space, or you simply forget to, like I did in my story above. Anyway, enjoy and stay tuned for more Maemo Apps, Games and Hacks!


Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.