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