Making an Amazon Music Player for Linux
Granted the Spotify player (App) is much, much better than the Amazon Music Player (Web).
But just for listening to some random music, Amazon isn’t too bad. Since I already have Prime, I don’t get ads. Whereas Spotify gives me an ad like every 10 minutes (and always the same ads…).
I use Amazon Music as a “radio” and Spotify, if I want to listen to a specific track. So whats wrong with Amazon Music in a Firefox browser tab ?
- it’s inconvenient to locate the tab quickly, to skip a song
- music stops, when I restart the browser or accidentally close too many tabs
- can’t see whats playing at a glance
- lame look and feel
- my Firefox clears cookies, so I have to re-login every time
Fail 1 : Amazon Music Player app
There is an actual “Amazon Music Player” app, but it is just a electron junk app that wraps the website. And it’s not available on Linux. I tried running it in a Windows VM, but this is just not convenient enough to bother with.
Fail 2 : Custom service in Ferdium
I thought it would be kinda neat to create a service in Ferdium for Amazon Music. That wasn’t very hard, but the Ferdium browser couldn’t provide the required DRM plugin. I didn’t try very hard to figure out, how to enable DRM in Ferdium though, because I got a better idea…
Success : Custom Firefox profile
You can run multiple Firefox instances with their own profiles.
- Use the
firefox --ProfileManagerto create a
Amazon Musicprofile. Before saving, mark the original “default” profile as the “Use the selected profile without asking at startup” and not the new “Amazon Music” profile!
- Start Firefox with the new profile. Configure this Firefox profile, so everything is super permissive. This instance won’t be used for browsing.
- Open Amazon Music Player in this profile, accept all cookies. Let Firefox install DRM extensions. Login and navigate to the place which you want to be your home page. Make this your home page in Firefox settings.
- Remove all GUI elements manually, except the navigation bar which contains the search bar.
- Copy MrOtherGuys userChrome.css into
- Create desktop file for GNOME (see below)
- Restart and enjoy
Amazon Music GNOME desktop file
Place this text into a
[Desktop Entry] Version=1.0 Type=Application Name=Amazon Music Player Comment=Play Music with Amazon Music Prime GenericName=Music Player Categories=GNOME;GTK;Network;Music Keywords=Amazon;Player;Music Icon=amazon-music Exec=firefox -P Amazon\ Music --class AmazonMusic %u StartupWMClass=AmazonMusic Terminal=false StartupNotify=true