'''M'''usic '''O'''n '''C'''onsole is a lightweight music player. It consists of 2 parts, a server (Moc) and the player/interface (Mocp).

+

[https://moc.daper.net/ Music On Console] (MOC) 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.

−

This is similar to [[mpd]], but unlike mpd, Moc comes with an interface.

−

==Installation==

+

== Installation ==

−

Sync and install with pacman:

+

[[Install]] the {{Pkg|moc}} package. The latest development version is available as {{AUR|moc-svn}}. For [[PulseAudio]] support install {{AUR|moc-pulse}} or {{AUR|moc-pulse-svn}} for the development version.

−

# pacman -S moc

−

==Configuration==

+

== Configuration ==

−

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

−

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

+

Sample configuration files can be found in {{ic|/usr/share/doc/moc/}}. On ''mocp'' first run the local {{ic|~/.moc/}} directory is created. To configure, copy the examples to it and edit accordingly.

+

+

Themes are stored in {{ic|/usr/share/moc/themes}} and can be set in {{ic|~/.moc/config}}. See {{ic|/usr/share/moc/themes/example_theme}} for more.

+

+

To change the default key bindings, see {{ic|/usr/share/doc/moc/keymap.example}}.

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

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

−

==Usage==

+

=== Lynx like navigation ===

+

+

To change directories with the arrow keys uncomment in {{ic|~/.moc/config}}:

+

+

Keymap = keymap

+

+

Edit the following in {{ic|~/.moc/keymap}}:

−

To start moc:

+

go = ENTER RIGHT

+

go_up = U LEFT

+

#seek_forward = RIGHT

+

#seek_backward = LEFT

−

$ mocp

+

== Usage ==

−

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

+

Run {{ic|mocp}} to start the server and interface. Some useful default shortcuts (press {{ic|h}} for more):

{{AUR|mocp-scrobbler}} is a Last.fm/Libre.fm scrobbler for MOC with support for now-playing notifications, daemonization and cache. It only depends on [[Python]] 3.

−

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.

+

Copy the example file to your user config directory:

−

* {{AUR|moc-svn}} (latest development code)

+

mkdir ~/.mocpscrob/

−

* {{AUR|moc-devel}} (old alpha version for next release)

+

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

−

==last.fm support==

+

Edit {{ic|~/.mocpscrob/config}} to add your login and password. The password variable will be replaced with {{ic|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 {{ic|password_md5}} will be replaced.

−

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

+

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

−

If services do not exists create them first:

+

alias mocp='/usr/bin/mocp-scrobbler.py -d; mocp'

−

create {{Ic|/etc/systemd/system/lastmp.service}} file and add following in it:

+

In January of 2016 last.fm updated their password requirements, with all new and updated passwords requiring the inclusion of one of the following characters {{ic|<nowiki>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~</nowiki>}}, 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 {{ic|~/.mocpscrob/config}} password accordingly resolves this issue.

−

{{bc|[Unit]

+

If you want to use Libre.fm instead of Last.fm it is important to change {{ic|hostname}} from {{ic|post.audioscrobbler.com}} to {{ic|turtle.libre.fm}}.

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 {{ic|.moc/config}} to use ASCII for drawing lines:

−

change permission:

+

ASCIILines = no

−

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

+

=== FATAL_ERROR: Layout1 is malformed ===

−

that's all.

+

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

+

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

+

or

+

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

−

==Front-ends==

+

See [http://moc.daper.net/node/262 original report] and [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485059 Debian bugs].

−

* {{AUR|dmenu_mocp}} is a dmenu frontend for moc

−

* {{AUR|mocicon}} GTK panel applet

−

* {{Pkg|moc-tray}} is a perl GTK dock that gives you access to moc functions

−

==Troubleshooting==

+

== See also ==

−

===moc fails to start===

−

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

−

==Additional resources==

* [http://moc.daper.net/documentation Official documentation]

* [http://moc.daper.net/documentation Official documentation]

Latest revision as of 09:47, 23 December 2017

Music On Console (MOC) 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.

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/mocp-scrobbler.py -d; mocp'

In January of 2016 last.fm 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 Libre.fm instead of Last.fm it is important to change hostname from post.audioscrobbler.com to turtle.libre.fm.

Troubleshooting

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: