From ArchWiki
Revision as of 15:24, 10 April 2013 by Dakatapetrov (Talk | contribs) ( support)

Jump to: navigation, search

Music On Console is a lightweight music player. It consists of 2 parts, a server (Moc) and the player/interface (Mocp). This is similar to mpd, but unlike mpd, Moc comes with an interface.


Sync and install with pacman:

# pacman -S moc


The package includes a sample configuration file at /usr/share/doc/moc/config.example. To configure moc, copy this file to ~/.moc/config and edit it.

For instructions about customizing the keybindings, read /usr/share/doc/moc/keymap.example.

If you want to use Moc with OSS v4.1, see OSS#MOC.


To start moc:

$ mocp

This will start the server and interface. You will enter player interface. Some useful shortcuts to use mocp (case sensitive):

Start playing a track Enter
Pause track Space or p
Play next track n
Play previous track b
Switch from playlist browsing to
filesystem browsing (and vice versa)
Add one track to the playlist a
Remove track from playlist d
Add a folder recursively to playlist A
Clear playlist C
Increase volume 5% . (dot)
Decrease volume 5% , (comma)
Increase volume 1% >
Decrease volume 1% <
Change volume to 10% meta + 1
Change volume to 20% meta + 2
Quit player q

NOTE: To shut down the server, use the shift (capital) Q key or:

$ mocp -x

Development versions

You can obtain these from the AUR. MOC 2.4.0 (stable) was released in 2006. Features since then are in 2.5, but are not yet blessed “stable” as of writing.

  • moc-svnAUR (latest development code)
  • moc-develAUR (old alpha version for next release) support

If you want scrobble songs to (moc >= 2.5.0 needed), install lastfmsubmitd. It is a daemon which is available in the "community" repository. First edit /etc/lastfmsubmitd.conf and enable both services lastfmsubmitd and lastmp with systemctl.

If services do not exists create them first:

create /etc/systemd/system/lastmp.service file and add following in it:


ExecStart=/usr/bin/lastmp --no-daemon


create /etc/systemd/system/lastfmsubmitd.service file and add following in it:

Description=LastFM Submit daemon

ExecStart=/usr/bin/lastfmsubmitd --no-daemon


Now add the following line to the moc configuration file:

OnSongChange = "/usr/lib/lastfmsubmitd/lastfmsubmit --artist %a --title %t --length %d --album %r"

change permission:

$ sudo chmod -R 777 /var/spool/lastfm

that's all.


  • dmenu_mocpAUR is a dmenu frontend for moc
  • mociconAUR GTK panel applet
  • moc-tray is a perl GTK dock that gives you access to moc functions


moc fails to start

If moc fails to start, it's most probably because of something wrong in ~/.moc/. You can try to fix it, or simply delete the whole folder.

Additional resources