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