Skip Navigation

Custom music during gameplay (ArkOS)

I've seen it asked (on Reddit) how to play custom background music while playing games on ArkOS. I wanted to share how I do it, in case others want to try it as well. I'm sure these instructions could be modified slightly for other Linux handhelds.

  • Gain terminal access (via SSH or directly on the device)
  • With your device connected to wifi run sudo apt install mpg123 to install the CLI-based music player
  • Transfer your desired music mp3s to a folder on the sd card
    • I use /roms2/Music/
  • Create the file start_music.sh in your ports folder which contains the line nohup mpg123 -z /<path>/<to>/<my>/<music>/<folder>/*.mp3 >/dev/null 2>&1 &
    • For me that line was nohup mpg123 -z /roms2/Music/*.mp3 >/dev/null 2>&1 & and the file was at /roms2/ports/start_music.sh
  • Create the file stop_music.sh in your ports folder which contains the line pkill mpg123
    • For me that file was at /roms2/ports/stop_music.sh
  • Log out of the terminal and restart EmulationStation

Now start_music and stop_music options are available in the 'Ports' section of EmulationStation. Running start_music starts a shuffled playlist of everything you put in that music folder. stop_music stops the music. Of course, you'll want to turn off the native background music in whatever game your playing too :)

EDIT: Updated the nohup line to dump outputs to the null output rather than to file (which could eventually grow to be large).

0
0 comments