chiark / gitweb /
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / doc / disorder.1.in
... / ...
CommitLineData
1.\"
2.\" Copyright (C) 2004-2008 Richard Kettlewell
3.\"
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 3 of the License, or
7.\" (at your option) any later version.
8.\"
9.\" This program is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
14.\" You should have received a copy of the GNU General Public License
15.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
16.\"
17.TH disorder 1
18.SH NAME
19disorder \- DisOrder jukebox client
20.SH SYNOPSIS
21.B disorder
22.RI [ OPTIONS ]
23.RB [ \-\- ]
24.RI [ COMMANDS ...]
25.SH DESCRIPTION
26.B disorder
27is used to query the \fBdisorderd\fR(8) daemon from the command line.
28It may be used to request tracks, scratch tracks, query the current
29state, etc, and by an administrator to shutdown or reconfigure the
30daemon.
31.PP
32If no commands are specified then \fBdisorder\fR connects to the
33daemon and then immediately disconnects.
34This can be used to test whether the daemon is running.
35Otherwise, it executes the commands specified.
36.PP
37This man page documents the command-line client.
38See \fBdisorderd\fR (8) for information about the server process
39and \fBdisorder_config\fR (5) for documentation of the configuration file.
40.SH OPTIONS
41.TP
42.B \-\-config \fIPATH\fR, \fB\-c \fIPATH
43Set the system configuration file.
44The default is
45given by the
46.B DISORDER_CONFIG
47environment variable, defaulting to
48.IR pkgconfdir/config .
49.TP
50.B \-\-user-config \fIPATH\fR, \fB\-u \fIPATH
51Set the user configuration file.
52THe default is given by the
53.B DISORDER_USERCONFIG
54environment variable, defaulting to
55.IR $HOME/.disorder/passwd .
56.TP
57.B \-\-debug\fR, \fB\-d
58Enable debugging.
59.TP
60.B \-\-help\fR, \fB\-h
61Display a usage message.
62.TP
63.B \-\-version\fR, \fB\-V
64Display version number.
65.TP
66.B \-\-help\-commands\fR, \fB\-H
67List all known commands.
68.SH COMMANDS
69.TP
70.B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR]
71Create a new user.
72If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
73setting from the server's configuration file applies.
74.TP
75.B adopt \fIID\fR
76Adopts track \fIID\fR (in the queue).
77The track will show up as submitted by the calling user.
78.TP
79.B authorize \fIUSERNAME\fR [\fIRIGHTS\fR]
80Create user \fIUSERNAME\fR with a random password.
81User \fIUSERNAME\fR must be a UNIX login user (not just any old string).
82If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
83setting from the server's configuration file applies.
84.IP
85\fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new
86user should be able to log in immediately.
87.IP
88If writing the \fIpasswd\fR file fails then the user will already have been
89created in DisOrder's user database.
90Use \fBdisorder deluser\fR to remove them before trying again.
91.TP
92.B deluser \fIUSERNAME\fR
93Delete a user.
94.TP
95.B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
96List all the directories in \fIDIRECTORY\fR.
97.IP
98An optional regexp may be specified, marked with an initial \fB~\fR.
99Only directories with a basename matching the regexp will be returned.
100.TP
101.B disable
102Disable playing after the current track finishes.
103.TP
104.B edituser \fIUSERNAME PROPERTY VALUE
105Set some property of a user.
106.TP
107.B enable
108(Re-)enable playing.
109.TP
110.B files \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
111List all the files in \fIDIRECTORY\fR.
112.IP
113An optional regexp may be specified, marked with an initial \fB~\fR.
114Only files with a basename matching the regexp will be returned.
115.TP
116.B get \fITRACK\fR \fIKEY\fR
117Display the preference \fIKEY\fR for \fITRACK\fR.
118See \fBdisorder_preferences\fR (5).
119.TP
120.B get\-global \fIKEY\fR
121Get a global preference.
122See \fBdisorder_preferences\fR (5).
123.TP
124.B get\-volume
125Display the current volume settings.
126.TP
127.B length \fITRACK\fR
128Display the length of \fITRACK\fR in seconds.
129.TP
130.B log
131Write event log messages to standard output, until the server is terminated.
132See \fBdisorder_protocol\fR (5) for details of the output syntax.
133.TP
134.B move \fITRACK\fR \fIDELTA\fR
135Move
136.I TRACK
137by
138.I DELTA
139within the queue.
140Positive values move towards the head of the queue, negative
141values towards the tail.
142.IP
143Note that if you specify a negative value then the
144.B \-\-
145option separate (before all commands) becomes mandatory, as otherwise the
146negative value is misinterpreted an an option.
147.TP
148.B part \fITRACK\fR \fICONTEXT\fI \fIPART\fR
149Get a track name part.
150.IP
151\fICONTEXT\fR should be either \fBsort\fR or \fBdisplay\fR.
152\fBpart\fR is the part of the name desired, typically \fBartist\fR,
153\fBalbum\fR or \fBtitle\fR.
154.TP
155.B pause
156Pause the current track.
157(Note that not all players support pausing.)
158.TP
159.B play \fITRACKS\fR...
160Add \fITRACKS\fR to the end of the queue.
161.TP
162.B playing
163Report the currently playing track.
164.TP
165.B playlist-del \fIPLAYLIST\fR
166Deletes playlist \fIPLAYLIST\fR.
167.TP
168.B playlist-get \fIPLAYLIST\fR
169Gets the contents of playlist \fIPLAYLIST\fR.
170.TP
171.B playlist-set \fIPLAYLIST\fR [\fIPATH\fR]
172Set the contents of playlist \fIPLAYLIST\fR.
173If an absolute path name is specified then the track list is read from
174that filename.
175Otherwise the track list is read from standard input.
176In either case, the list is terminated either by end of file or by a line
177containing a single ".".
178.TP
179.B playlists
180Lists known playlists (in no particular order).
181.TP
182.B prefs \fITRACK\fR
183Display all the preferences for \fITRACK\fR.
184See \fBdisorder_preferences\fR (5).
185.TP
186.B queue
187List the current queue.
188The first entry in the list is the next track to play.
189.TP
190.B random\-disable
191Disable random play.
192.TP
193.B random\-enable
194Enable random play.
195.TP
196.B recent
197List recently played tracks.
198The first entry is the oldest track, the last entry is the most
199recently played one.
200.TP
201.B reconfigure
202Make the daemon reload its configuration file.
203.IP
204Not all configuration options can be modified during the lifetime of the
205server; of those that can't, some will just be ignored if they change while
206others will cause the new configuration to be rejected.
207See \fBdisorder_config\fR(5) for details.
208.TP
209.B remove \fITRACK\fR
210Remove a track from the queue.
211.TP
212.B rescan
213Rescan the filesystem for new tracks.
214There is an automatic daily rescan but if you've just added some tracks
215and want them to show up immediately, use this command.
216.TP
217.B resolve \fITRACK\fR
218Resolve aliases for \fITRACK\fR and print out the real track name.
219.TP
220.B resume
221Resume the current track after a pause.
222.TP
223.B rtp\-address
224Report the RTP brodcast address used by the server (if any).
225.TP
226.B schedule-del \fIEVENT\fR
227Delete a scheduled event.
228.TP
229.B schedule-list
230List scheduled events.
231Each line contains the ID, a timestamp, 'N' or 'J' for normal or junk priority,
232the user, the action and action-specific data.
233.TP
234.B schedule-play \fIWHEN PRIORITY TRACK\fI
235Play \fITRACK\fR at time \fIWHEN\fR.
236Various time/date formats are supported depending on locale but the following
237three will always work:
238.RS
239.RS
240.TP
241.B "YYYY-MM-DD HH:MM:SS"
242.TP
243.B "HH:MM:SS"
244.TP
245.B "HH:MM"
246.RE
247.RE
248.IP
249\fIPRIORITY\fR should be \fBjunk\fR or \fBnormal\fR.
250This determines how the event is handled if it becomes due when the server is
251down.
252Junk events are just discarded in this case, while normal events will be
253executed when the server comes back up, even if this is much later.
254.TP
255.B schedule-set-global \fIWHEN PRIORITY NAME VALUE\fI
256Set global preference \fINAME\fR to \fIVALUE\fR at time \fIWHEN\fR.
257.TP
258.B schedule-unset-global \fIWHEN PRIORITY NAME\fI
259Unset global preference \fINAME\fR at time \fIWHEN\fR.
260.TP
261.B scratch
262Scratch the currently playing track.
263.TP
264.B scratch\-id \fIID\fR
265Scratch the currently playing track, provided it has the given ID.
266.TP
267.B search \fITERMS\fR
268Search for tracks containing all of the listed terms.
269The terms are separated by spaces and form a single argument,
270so must be quoted, for example:
271.IP
272.B "disorder search 'bowie china'"
273.IP
274You can limit the search to tracks with a particular tag, too, using the
275\fBtag:\fR modifier.
276For example:
277.IP
278.B "disorder search 'love tag:depressing'"
279.TP
280.B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
281Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
282See \fBdisorder_preferences\fR (5).
283.TP
284.B set\-global \fIKEY\fR \fIVALUE\fR
285Set a global preference.
286See \fBdisorder_preferences\fR (5).
287.TP
288.B set\-volume \fBLEFT\fR \fBRIGHT\fR
289Set the volume.
290.TP
291.B setup\-guest \fR[\fB\-\-no\-online\-registration\fR]
292Create the "guest" user for use by the web interface.
293This user will have no password and will only have the "read" and
294"register" rights, the latter allowing new users to automatically
295register themselves via the web interface.
296.IP
297With the option \fB\-\-no-online\-registration\fR, the "register" right is
298suppressed and users must be manually created by an administrator.
299.IP
300If online registration is desired then \fBmail_sender\fR must be set in the
301configuration file.
302See \fBdisorder_config\fR(5).
303.TP
304.B shutdown
305Shut down the daemon.
306.TP
307.B stats
308List server statistics.
309.TP
310.B tags
311List known tags.
312.TP
313.B unset \fITRACK\fR \fIKEY\fR
314Unset the preference \fIKEY\fR for \fITRACK\fR.
315See \fBdisorder_preferences\fR (5).
316.TP
317.B unset\-global \fIKEY\fR
318Unset the global preference \fIKEY\fR.
319See \fBdisorder_preferences\fR (5).
320.TP
321.B userinfo \fIUSERNAME PROPERTY
322Get some property of a user.
323.TP
324.B users
325List known users.
326.TP
327.B version
328Report the daemon's version number.
329.PP
330For
331.B move
332and
333.BR remove ,
334tracks may be specified by name or by ID.
335If you use the name and a track appears twice in the queue it is
336undefined which is affected.
337.SH NOTES
338.B disorder
339is locale-aware.
340If you do not set the locale correctly then it may not handle non-ASCII
341data properly.
342.PP
343The client determines which user to attempt to authenticate as by examining the
344current UID.
345This can be overridden in a per-user configuration file, see
346\fBdisorder_config\fR(5).
347.PP
348See \fBdisorder_protocol\fR(5) for the rights required to run each command.
349(For instance, \fBshutdown\fR requires the \fBadmin\fR right, which most users
350would not normally have.)
351.PP
352This program is not intended to run in a setuid environment.
353.PP
354The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the
355syntax described in \fBpcrepattern\fR(3).
356Matching is case-independent.
357It is strongly recommended that you quote regexps, since they often
358contain characters treated specially by the shell.
359For example:
360.PP
361.B "disorder dirs /Music ~'^(?!the [^t])t'"
362.SH TROUBLESHOOTING
363If you cannot play a track, or it does not appear in the database even after a
364rescan, check the following things:
365.TP
366.B .
367Are there any error messages in the system log? The server logs to
368\fBLOG_DAEMON\fR, which typically ends up in
369.I /var/log/daemon.log
370or
371.IR /var/log/messages ,
372though this depends on local configuration.
373.TP
374.B .
375Is the track in a known format? Have a look at
376.I pkgconfdir/config
377for the formats recognized by the local installation.
378The filename matching is case-sensitive.
379.TP
380.B .
381Do permissions on the track allow the server to read it?
382.TP
383.B .
384Do the permissions on the containing directories allow the server to read and
385execute them?
386.PP
387The user the server runs as is determined by the \fBuser\fR directive in the
388configuration file.
389The README recommends using \fBjukebox\fR for this purpose but it could
390be different locally.
391.SH ENVIRONMENT
392.TP
393.B DISORDER_CONFIG
394Main configuration file to use instead of
395.IR pkgconfdir/config .
396Overridden by the
397.B \-c
398.RB ( \-\-config )
399command-line option.
400.TP
401.B DISORDER_HOME
402Per-user configuration and state directory to use instead of
403.BR $HOME/.disorder .
404.TP
405.B DISORDER_PRIVCONFIG
406Private configuration file to use instead of
407.IR pkgconfdir/config.private .
408.TP
409.B DISORDER_USERCONFIG
410Per-user configuration file to use instead of
411.BR $DISORDER_HOME/passwd .
412Overridden by the
413.B \-u
414.RB ( \-\-user-config )
415command-line option.
416.TP
417.B DISORDER_USERCONFIG_SYS
418System-provided per-user configuration file to use instead of
419.BR $DISORDER_HOME/passwd .
420.TP
421.B HOME
422The user's home directory.
423.TP
424.B LC_ALL\fR, \fBLANG\fR, etc
425Current locale.
426See \fBlocale\fR(7).
427.SH FILES
428.TP
429.I pkgconfdir/config
430Global configuration file.
431See \fBdisorder_config\fR(5).
432.TP
433.I ~/.disorder/passwd
434Per-user password file
435.TP
436.I pkgstatedir/socket
437Communication socket for \fBdisorder\fR(1).
438.SH "SEE ALSO"
439\fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2),
440\fBpcrepattern\fR(3), \fBdisobedience\fR(1), \fBdisorder.cgi\fR(8),
441\fBdisorder_preferences\fR(5)
442.PP
443"\fBpydoc disorder\fR" for the Python API documentation.
444.\" Local Variables:
445.\" mode:nroff
446.\" fill-column:79
447.\" End: