ro:Moc 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, although its server doesn't support access through net.
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
To start moc:
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|
|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|
NOTE: To shut down the server, use the shift (capital) Q key or:
$ mocp -x
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.
- AUR (latest development code)
- AUR (old alpha version for next release)
If you want scrobble songs to last.fm (moc >= 2.5.0 needed), install
/etc/lastfmsubmitd.conf and enable both services
If services do not exists create them first:
/etc/systemd/system/lastmp.service file and add following in it:
[Unit] Description=LastMP After=mpd.service [Service] ExecStart=/usr/bin/lastmp --no-daemon [Install] WantedBy=multi-user.target
/etc/systemd/system/lastfmsubmitd.service file and add following in it:
[Unit] Description=LastFM Submit daemon After=network.target [Service] ExecStart=/usr/bin/lastfmsubmitd --no-daemon [Install] WantedBy=multi-user.target
Now add the following line to the moc configuration file:
OnSongChange = "/usr/lib/lastfmsubmitd/lastfmsubmit --artist %a --title %t --length %d --album %r"
$ sudo chmod -R 777 /var/spool/lastfm
- AUR is a dmenu frontend for moc
- AUR GTK panel applet
- 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.
If you see strange-like characters displayed in moc instead of the normal lines (vertical lines to separate space, etc.) likely you've a font set which MOC doesn't play nice with. You can either change the font you have selected for your terminal or edit the MOC config file (search config file for something about use ASII only).