Archive for the 'Linux' Category

Getting iTunes Genius into MPD

I just wrote my first ever AppleScript to solve a problem I’ve had for some time. As I’ve mentioned several times before, I use the MPD music player on my HTPC to play music through my amplifier while controlling playback using my laptop or mobile phone. This works like a charm and I’ve been really satisfied with this setup — until I fell in love with iTunes’ Genius function.

I use iTunes on my MacBook and mainly at work, either listening through my headphones or streaming music to the office speakers using our AirPort Extreme. As my library is rather diverse, I like to use Genius to get an ad hoc playlist of similar songs to avoid the “shuffle all, press next until a good song comes along” selection method. Needless to say, Genius has worked fabulously. However, when I come home and start playing music through MPD, I’m back to the shuffle all hell since I can’t be bothered creating playlists manually.

So this got me thinking: Is there any way I can use iTunes Genius together with MPD? The answer is yes, and the tool I used is AppleScript.

Continue reading ‘Getting iTunes Genius into MPD’

Control MPD from your mobile phone with Remuco

I’ve already gone on about how fantastic MPD (Music Player Daemon) is. The server-client music player has totally changed the way I listen to music at home. By having the MPD server (that actually does the playing) constantly running on my HTPC connected to my amp and speakers, I can control the music playback from any device that has an MPD client written for it. Since the server doesn’t stop playing if a client quits, I can start playback using one client and stop it using another.

Until today, I had a couple of text-based clients on the HTPC itself (for controlling playback over SSH ;), two-three clients on my laptop, one on my girlfriends laptop and one on her iTouch. Chances are quite high that at least one of these are switched on and within reach at any given time. However, there are times when both laptops are shut down, the iTouch has run out of batteries, I’m late for work and MPD is happily playing since I forgot to stop it before I put my Macbook to sleep. This morning was such a time.

When I was new to MPD and wanted to install clients on everything including the toaster and microwave oven, I tried out a client for S60 mobile phones. As far as I remember, something didn’t work and I probably lost interest and thought that my gazillion clients already installed would suffice. Well, today I started looking into it again, the JavaME client for MPD, Remuco.

Continue reading ‘Control MPD from your mobile phone with Remuco’

SSH tunnel from the command line

Every once in a while I need to set up a temporary SSH tunnel from one computer to another, possibly via a third one, and can’t be bothered with configuring any of my otherwise frequently used GUI tools ‘SSH Tunnel Manager’ for OS X or ‘SSH Tunnel’ on Win XP. Each time, however, I end up reading the man page for the ssh command or googling for ’ssh tunnel linux’ or something similar, since I never seem to remember how to set up a simple SSH tunnel on the command line. The ssh man page is especially unhelpful:

-L [bind_address:]port:host:hostport

What? Which port goes where? And what’s the bind_address and hostport? If you read the explanation of the switch you’ll probably just become even more confused. After a few trials and errors I usually get my SSH tunnel up and running, but most of the time I’m not quite sure what I’ve really done.

So here’s a note to self on how to do this once and for all.

Continue reading ‘SSH tunnel from the command line’

Rewriting the WPG2 URL

I’m sick and tired of the new WPG2 plugin for Wordpress forcing me to use the embedded gallery page. Sure, nowadays you can configure it to look identical to the actual gallery, but that doesn’t satisfy me. Since my gallery is on another virtual domain (gallery.fredrikbostrom.net as opposed to blog.fredrikbostrom.net) I want the images in my Wordpress sidebar to link to a page where the URL tells me that I’ve moved away from the blog and am now viewing the gallery. WPG2 version 3.x doesn’t do this, so I decided to fix it myself (yet again a case of “if you want something done, do it yourself).

Continue reading ‘Rewriting the WPG2 URL’

Goodbye Amarok – welcome mpd

I just discovered the perfect solution to one of my biggest problems in recent memory, i.e. controlling playback of my music playing on my Home Entertainment Computer. It’s called mpd and I love it. I love it I love it I love it I love it. Why didn’t anyone tell me about this earlier? It lets me remote control music playback on my entertainment machine from virtually any device in my flat. Well, I don’t think there’s an mpd client for coffee brewers yet, but still.

Continue reading ‘Goodbye Amarok – welcome mpd’