Open last.fm radio links directly in amarok from firefox

Amarok has been able to play last.fm streams for a while now, but I was looking for a way to click on a link in firefox, and have it play straight away in amarok, no cocking about. I searched for a while to get lastfm:// links opened in amarok from firefox properly, and eventually found it in a "how to do this in opera". Heres how:

  • Open about:config
  • Right-click, NEW, String
  • Enter "network.protocol-handler.app.lastfm" as the preference name
  • Enter the path to amarok as the string value "/usr/bin/amarok" is Ubuntu's default ("which amarok" in a console will tell you for sure though)
  • Restart Firefox
  • Clicky lastfm://globaltags/psychedelic
  • Enjoy!

This can also be used to add other protocols, mailto: for instance. Use the same method, but change the last bit to suit your protocol, eg: network.protocol-handler.app.ass for ass: links (common on government sites*)

 

*Not really