shuffled play startup from command line

Hey, I really like the idea of music daemon in the background and not requiring any user interface, because this is exactly how I listen to music most of the time.
So I have Repeat=yes, Shuffle=yes in ~/.moc/config.
The playlist is ~/.moc/playlist.m3u and it contains all music accessible to me.
With such setup, how do I start playing with minimal interaction?
e.g. the following just don't do their job properly:
mocp --play
mocp --play ~/.moc/playlist.m3u

For now the only solution I know is to go and select the first song with:
mocp ~/.moc/playlist.m3u

I really don't care which song is going to be first, I prefer random choice when Shuffle=yes and probably the first one in playlist when Shuffle=no.

I use moc-2.3.2 from Debian. I could not locate your previous forum, so this post is probably a duplicate..
anyway, please post a command line solution if there is one, or otherwise I will file a bugreport :)


I don't think there is a way to do this in 2.3, but with 2.4 (2.4.0-alpha1) you can just use mocp -p.

Damian Pietras - MOC developer

I downloaded
but it did not work on my up-to-date Debian SID:

# dpkg -i moc_2.3.2+2.4.0-alpha1-1_i386.deb
(Reading database ... 225657 files and directories currently installed.)
Preparing to replace moc 2.3.2+2.4.0-alpha1-1 (using moc_2.3.2+2.4.0-alpha1-1_i386.deb) ...
Unpacking replacement moc ...
dpkg: dependency problems prevent configuration of moc:
moc depends on libasound2 (>> 1.0.9+1.0.10rc1); however:
Version of libasound2 on system is 1.0.9-3.
moc depends on libcurl3-gnutls (>= 7.14.1-1); however:
Package libcurl3-gnutls is not installed.
dpkg: error processing moc (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:

I also looked for newer libasound2 and libcurl3-gnutils but I could not find. Are they somewhere in experimental?

Then I went for tar.bz2 snapshot, it's a pitty there is no debian dir.
"./configure" looked around and said:
MOC will be compiled with:
Decoder plugins:
OSS: yes
ALSA: yes
JACK: no
DEBUG: yes
ICONV: yes
Network streams: no
Resampling: no

With "make" I got mocp, but it complains:
FATAL_ERROR: No decoder plugins have been loaded!

I couldn't find anything on that in README nor INSTALL.
I see there is decoder_plugin dir with mp3, ogg etc, I went to mp3, Makefile is already there, so typed "make" and got bunch of problems...
How can this be fixed?

AFAIK for current MOC packages you need Debian unstable.

When compiling from sources you need -dev packages of libraries, for example libmad0-dev in addition to libmad0.
Damian Pietras - MOC developer

Debian SID is a synonym for Debian unstable, at least it used to be.
Anyway "unstable" is my sources.list with only exception to Marillat's repositories who prefer explicit name sid.
I am still puzzled with libasound2.


the debs at lxtec are built against libcurl3-gnutls and alsa 1.0.10rc1. Both are available in experimental.
Anyway libcurl3-gnutls has found its way to sid today, so I'll prepare new packages depending only on sid-stuff both 2.3.2 and 2.4.0-alpha1.


The path to source is always uphill ;-)

New debs build again libcurl3-gnutls out of sid can be found at now. Plese notice that 2.3.2 _and_ 2.3.2+2.4.0-alpha1 is available.

The path to source is always uphill ;-)

can be found at


The path to source is always uphill ;-)