2 .\" Copyright (C) 2004-2008 Richard Kettlewell
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
9 .\" This program is distributed in the hope that it will be useful, but
10 .\" WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 .\" General Public License for more details.
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software
16 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21 disorder \- DisOrder jukebox client
29 is used to query the \fBdisorderd\fR(8) daemon from the command line.
30 It may be used to request tracks, scratch tracks, query the current
31 state, etc, and by an administrator to shutdown or reconfigure the
34 If no commands are specified then \fBdisorder\fR connects to the
35 daemon and then immediately disconnects.
36 This can be used to test whether the daemon is running.
37 Otherwise, it executes the commands specified.
40 .B \-\-config \fIPATH\fR, \fB\-c \fIPATH
41 Set the configuration file.
43 .IR pkgconfdir/config .
45 .B \-\-debug\fR, \fB\-d
48 .B \-\-help\fR, \fB\-h
49 Display a usage message.
51 .B \-\-version\fR, \fB\-V
52 Display version number.
54 .B \-\-help\-commands\fR, \fB\-H
55 List all known commands.
58 .B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR]
60 If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
61 setting from the server's configuration file applies.
63 .B authorize \fIUSERNAME\fR [\fIRIGHTS\fR]
64 Create user \fIUSERNAME\fR with a random password.
65 User \fIUSERNAME\fR must be a UNIX login user (not just any old string).
66 If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
67 setting from the server's configuration file applies.
69 \fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new
70 user should be able to log in immediately.
72 If writing the \fIpasswd\fR file fails then the user will already have been
73 created in DisOrder's user database.
74 Use \fBdisorder deluser\fR to remove them before trying again.
76 .B deluser \fIUSERNAME\fR
79 .B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
80 List all the directories in \fIDIRECTORY\fR.
82 An optional regexp may be specified, marked with an initial \fB~\fR.
83 Only directories with a basename matching the regexp will be returned.
86 Disable playing after the current track finishes.
88 .B edituser \fIUSERNAME PROPERTY VALUE
89 Set some property of a user.
94 .B files \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
95 List all the files in \fIDIRECTORY\fR.
97 An optional regexp may be specified, marked with an initial \fB~\fR.
98 Only files with a basename matching the regexp will be returned.
100 .B get \fITRACK\fR \fIKEY\fR
101 Display the preference \fIKEY\fR for \fITRACK\fR.
103 .B get\-global \fIKEY\fR
104 Get a global preference.
107 Display the current volume settings.
109 .B length \fITRACK\fR
110 Display the length of \fITRACK\fR in seconds.
113 Write event log messages to standard output, until the server is terminated.
114 See \fBdisorder_protocol\fR (5) for details of the output syntax.
116 .B move \fITRACK\fR \fIDELTA\fR
122 Positive values move towards the head of the queue, negative
123 values towards the tail.
125 Note that if you specify a negative value then the
127 option separate (before all commands) becomes mandatory, as otherwise the
128 negative value is misinterpreted an an option.
130 .B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
131 Get a track name part.
133 \fICONTEXT\fR should be either \fBsort\fR or \fBdisplay\fR.
134 \fBpart\fR is the part of the name desired, typically \fBartist\fR,
135 \fBalbum\fR or \fBtitle\fR.
138 Pause the current track.
139 (Note that not all players support pausing.)
141 .B play \fITRACKS\fR...
142 Add \fITRACKS\fR to the end of the queue.
145 Report the currently playing track.
148 Display all the preferences for \fITRACK\fR.
151 List the current queue.
152 The first entry in the list is the next track to play.
161 List recently played tracks.
162 The first entry is the oldest track, the last entry is the most
166 Make the daemon reload its configuration file.
168 .B remove \fITRACK\fR
169 Remove a track from the queue.
172 Rescan the filesystem for new tracks.
173 There is an automatic daily rescan but if you've just added some tracks
174 and want them to show up immediately, use this command.
176 .B resolve \fITRACK\fR
177 Resolve aliases for \fITRACK\fR and print out the real track name.
180 Resume the current track after a pause.
183 Report the RTP brodcast address used by the server (if any).
185 .B schedule-del \fIEVENT\fR
186 Delete a scheduled event.
189 List scheduled events.
190 Each line contains the ID, a timestamp, 'N' or 'J' for normal or junk priority,
191 the user, the action and action-specific data.
193 .B schedule-play \fIWHEN PRIORITY TRACK\fI
194 Play \fITRACK\fR at time \fIWHEN\fR.
195 Various time/date formats are supported depending on locale but the following
196 three will always work:
200 .B "YYYY-MM-DD HH:MM:SS"
208 \fIPRIORITY\fR should be \fBjunk\fR or \fBnormal\fR.
209 This determines how the event is handled if it becomes due when the server is
211 Junk events are just discarded in this case, while normal events will be
212 executed when the server comes back up, even if this is much later.
214 .B schedule-set-global \fIWHEN PRIORITY NAME VALUE\fI
215 Set global preference \fINAME\fR to \fIVALUE\fR at time \fIWHEN\fR.
217 .B schedule-unset-global \fIWHEN PRIORITY NAME\fI
218 Unset global preference \fINAME\fR at time \fIWHEN\fR.
221 Scratch the currently playing track.
223 .B scratch\-id \fIID\fR
224 Scratch the currently playing track, provided it has the given ID.
226 .B search \fITERMS\fR
227 Search for tracks containing all of the listed terms.
228 The terms are separated by spaces and form a single argument,
229 so must be quoted, for example:
231 .B "disorder search 'bowie china'"
233 You can limit the search to tracks with a particular tag, too, using the
237 .B "disorder search 'love tag:depressing'"
239 .B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
240 Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
242 .B set\-global \fIKEY\fR \fIVALUE\fR
243 Set a global preference.
245 .B set\-volume \fBLEFT\fR \fBRIGHT\fR
248 .B setup\-guest \fR[\fB\-\-no\-online\-registration\fR]
249 Create the "guest" user for use by the web interface.
250 This user will have no password and will only have the "read" and
251 "register" rights, the latter allowing new users to automatically
252 register themselves via the web interface.
254 With the option \fB\-\-no-online\-registration\fR, the "register" right is
255 suppressed and users must be manually created by an administrator.
257 If online registration is desired then \fBmail_sender\fR must be set in the
259 See \fBdisorder_config\fR(5).
262 Shut down the daemon.
265 List server statistics.
270 .B unset \fITRACK\fR \fIKEY\fR
271 Unset the preference \fIKEY\fR for \fITRACK\fR.
273 .B unset\-global \fIKEY\fR
274 Unset the global preference \fIKEY\fR.
276 .B userinfo \fIUSERNAME PROPERTY
277 Get some property of a user.
283 Report the daemon's version number.
289 tracks may be specified by name or by ID.
290 If you use the name and a track appears twice in the queue it is
291 undefined which is affected.
293 Currently the following preferences are supported.
294 Some are expected to be set by users, others updated automatically by plugins.
297 If this preference is present and set to "0" then the track will not
298 be picked for random play.
302 A decimal integer giving the number times the track was played.
303 This includes tracks that are scratched or were picked at random.
306 The last time the track was played, as a \fBtime_t\fR converted to a
310 The number of times the track has been scratched.
313 A decimal integer giving the number of times the track was requested.
314 (Tracks that are removed before being played are not counted.)
317 Tags that apply to this track, separated by commas.
318 Tags can contain any printing character except comma.
319 Leading and trailing spaces are not significant but internal spaces are.
325 global preferences, it is possible to limit the tracks that will be selected at
328 .B trackname_\fICONTEXT\fB_\fIPART\fR
329 These preferences can be used to override the filename parsing rules
330 to find a track name part.
331 For backwards compatibility, \fBtrackname_\fIPART\fR will be used
332 if the full version is not present.
335 The number of times the track has been played to completion without
339 The weight for this track. Weights are non-negative integers which determine
340 the relative likelihood of a track being picked at random (i.e. if track A has
341 twice the weight of track B then it is twice as likely to be picked at random).
342 A track with weight 0 will not be picked at random, though \fBpick_at_random\fR
343 is a more sensible way to configure this.
345 The default weight, used if no weight is set or the weight value is invalid, is
346 90000. Note that many other factors than track weight affect whether a track
347 will be played - tracks already in the queue will not be picked at random for
350 The maximum allowed weight is 2147483647. If you set a larger value it will be
351 clamped to this value. Negative weights will be completely ignored and the
352 default value used instead.
356 If you do not set the locale correctly then it may not handle non-ASCII
359 The client determines which user to attempt to authenticate as by examining the
361 This can be overridden in a per-user configuration file, see
362 \fBdisorder_config\fR(5).
364 See \fBdisorder_protocol\fR(5) for the rights required to run each command.
365 (For instance, \fBshutdown\fR requires the \fBadmin\fR right, which most users
366 would not normally have.)
368 This program is not intended to run in a setuid environment.
370 The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the
371 syntax described in \fBpcrepattern\fR(3).
372 Matching is case-independent.
373 It is strongly recommended that you quote regexps, since they often
374 contain characters treated specially by the shell.
377 .B "disorder dirs /Music ~'^(?!the [^t])t'"
379 If you cannot play a track, or it does not appear in the database even after a
380 rescan, check the following things:
383 Are there any error messages in the system log? The server logs to
384 \fBLOG_DAEMON\fR, which typically ends up in
385 .I /var/log/daemon.log
387 .IR /var/log/messages ,
388 though this depends on local configuration.
391 Is the track in a known format? Have a look at
393 for the formats recognized by the local installation.
394 The filename matching is case-sensitive.
397 Do permissions on the track allow the server to read it?
400 Do the permissions on the containing directories allow the server to read and
403 The user the server runs as is determined by the \fBuser\fR directive in the
405 The README recommends using \fBjukebox\fR for this purpose but it could
406 be different locally.
410 The default username.
413 The user's home directory.
415 .B LC_ALL\fR, \fBLANG\fR, etc
421 Global configuration file.
422 See \fBdisorder_config\fR(5).
424 .I ~/.disorder/passwd
425 Per-user password file
427 .I pkgstatedir/socket
428 Communication socket for \fBdisorder\fR(1).
430 \fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2),
431 \fBpcrepattern\fR(3), \fBdisobedience\fR(1), \fBdisorder.cgi\fR(8)
433 "\fBpydoc disorder\fR" for the Python API documentation.