From ArchWiki
Jump to: navigation, search

Music On Console is a lightweight music player which consists of 2 parts, a server (Moc) and a player/interface (Mocp). This is similar to mpd, but unlike mpd, Moc comes with an interface. Its server does not support remote access.


Install the moc package. The latest development version is available as moc-svnAUR.


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.

Themes are stored in /usr/share/moc/themes which are easy to understand and make, see example_theme for instructions.

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.


Start moc:

$ mocp

This will start the server and interface. Some useful shortcuts (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 Shift+a
Clear playlist Shift+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 Shift+q or:
$ mocp -x scrobbling


mocp-scrobblerAUR is a scrobbler for MOC with support for now-playing notifications, daemonization and cache. It only depends on Python 3.

Copy the example file to your user config directory:

mkdir ~/.mocpscrob/
cp /usr/share/doc/mocp-scrobbler/config.example  ~/.mocpscrob/config

Edit ~/.mocpscrob/config to add your login and password. The password variable will be replaced with password_md5 on the first run. Its value will be the original value hashed using MD5 algorithm. If you want to change password, just add again password with you new password, and password_md5 will be replaced.

To scrobble tracks, start mocp-scrobbler as daemon before mocp. You can also use an alias:

alias mocp='/usr/bin/ -d; mocp'

In January of 2016 updated their password requirements, with all new and updated passwords requiring the inclusion of one of the following characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~, or a space". This is known to cause an authentication error with mocpscrob configurations which specify passwords not conforming to these new specifications. Changing one's password and updating the ~/.mocpscrob/config password accordingly resolves this issue.

If you want to use instead of it is important to change hostname from to


  • dmenu_mocp — Dmenu frontend to MOC || dmenu_mocpAUR[broken link: archived in aur-mirror]
  • mocicon — GTK panel applet to control MOC || mociconAUR
  • moc-tray — Quick and easy access to mocp basic functions || moc-tray
  • eXo — Qt frontend to MOC, supports scrobbling || not packaged? search in AUR

systemd service file

Description=MOC server

ExecStart=/usr/bin/mocp -S
ExecStop=/usr/bin/mocp -x


Enable this service for the respective user.


MOC fails to start

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

Strange characters

If you see strange-like characters displayed in moc instead of the normal lines (vertical lines to separate space, etc.), you may have a font set incompatible to MOC. Either change the respective font, or edit .moc/config to use ASCII for drawing lines:

ASCIILines = no

FATAL_ERROR: Layout1 is malformed

If MOC crashes with this error, try adding either line to .moc/config:

Layout1 = directory(0,0,50%,100%): playlist(50%,0,100%,100%)


Layout1 = directory(0,0,50%,100%): playlist(50%,0,FILL,100%)

See original report and Debian bugs.

See also