Play Music on Raspberry Pi Using XMMS2

Introduction

I installed and trialled the following music/media players in my Raspberry Pi:

rhythymbox – Crashed every time I clicked on a song

audacious – Did not respond every time I clicked on a song

mplayer – Worked as expected

clementine – Did not respond every time I clicked on a song

xmms2 – Worked as expectedPlay Music on Raspberry Pi Using XMMS2

Of the 2 music player that worked on my Raspberry Pi, I chose xmms2 to be the music player of my Raspberry Pi because it has Linux Infrared Remote Control (LIRC) support that is easily implemented.

The following package are involved in distributing XMMS2:

  • xmms2-core
  • xmms2-client-cli

Scope

This instructable will show how to:

  1. Install XMMS2 player and its command line interface (CLI) client.
  2. Add songs to the default playlist using its CLI client.
  3. Play the songs using its CLI client.

Step 1: Install the xmms2

Open terminal emulator in Raspberry Pi

$sudo apt-get update
$sudo apt-get install xmms2

Step 2: Add songs to the default playlist

Open terminal emulator in Raspberry Pi

$xmms2 add -f /path/to/mp3/files/*.mp3<br>

Verify that the songs has been added to the playlist

$xmms2 list

Step 3: Play songs in the playlist

Open terminal emulator in Raspberry Pi.

Instruct XMMS2 to begin playing

$xmms2 play

Play Music on Raspberry Pi Using XMMS2 schematic

Step 4: Auto start XMMS2 after every reboot

Open terminal emulator in Raspberry Pi

Configure X session to auto start XMMS2.

$vi ~/.config/lxsession/LXDE/autostart

Add the entries as shown in the screenshot

Save the file

 

For more detail: Play Music on Raspberry Pi Using XMMS2


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top