chiark / gitweb /
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / doc / disorder.1.in
CommitLineData
460b9539 1.\"
5aff007d 2.\" Copyright (C) 2004-2008 Richard Kettlewell
460b9539 3.\"
e7eb3a27 4.\" This program is free software: you can redistribute it and/or modify
460b9539 5.\" it under the terms of the GNU General Public License as published by
e7eb3a27 6.\" the Free Software Foundation, either version 3 of the License, or
460b9539 7.\" (at your option) any later version.
e7eb3a27
RK
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.\"
460b9539 14.\" You should have received a copy of the GNU General Public License
e7eb3a27 15.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
460b9539 16.\"
17.TH disorder 1
18.SH NAME
19disorder \- DisOrder jukebox client
20.SH SYNOPSIS
21.B disorder
22.RI [ OPTIONS ]
0d350ff0 23.RB [ \-\- ]
460b9539 24.RI [ COMMANDS ...]
460b9539 25.SH DESCRIPTION
460b9539 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
c0c23a60
RK
33daemon and then immediately disconnects.
34This can be used to test whether the daemon is running.
35Otherwise, it executes the commands specified.
3d1452ab
RK
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.
460b9539 40.SH OPTIONS
41.TP
0d350ff0 42.B \-\-config \fIPATH\fR, \fB\-c \fIPATH
af52ec84 43Set the system configuration file.
c0c23a60 44The default is
8ab2aa9f
MW
45given by the
46.B DISORDER_CONFIG
47environment variable, defaulting to
460b9539 48.IR pkgconfdir/config .
49.TP
af52ec84
MW
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
0d350ff0 57.B \-\-debug\fR, \fB\-d
460b9539 58Enable debugging.
59.TP
0d350ff0 60.B \-\-help\fR, \fB\-h
460b9539 61Display a usage message.
62.TP
0d350ff0 63.B \-\-version\fR, \fB\-V
460b9539 64Display version number.
65.TP
0d350ff0 66.B \-\-help\-commands\fR, \fB\-H
460b9539 67List all known commands.
68.SH COMMANDS
69.TP
90ad6c6e 70.B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR]
c0c23a60
RK
71Create a new user.
72If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
73setting from the server's configuration file applies.
0f55e905 74.TP
edff49e6
RK
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
90ad6c6e
RK
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).
c0c23a60
RK
82If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR
83setting from the server's configuration file applies.
e86021e4 84.IP
90ad6c6e 85\fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new
5b14453f
RK
86user should be able to log in immediately.
87.IP
88If writing the \fIpasswd\fR file fails then the user will already have been
c0c23a60
RK
89created in DisOrder's user database.
90Use \fBdisorder deluser\fR to remove them before trying again.
e86021e4 91.TP
90ad6c6e 92.B deluser \fIUSERNAME\fR
a55c70c7
RK
93Delete a user.
94.TP
460b9539 95.B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR]
96List all the directories in \fIDIRECTORY\fR.
97.IP
c0c23a60
RK
98An optional regexp may be specified, marked with an initial \fB~\fR.
99Only directories with a basename matching the regexp will be returned.
460b9539 100.TP
101.B disable
0f55e905 102Disable playing after the current track finishes.
460b9539 103.TP
90ad6c6e 104.B edituser \fIUSERNAME PROPERTY VALUE
a55c70c7
RK
105Set some property of a user.
106.TP
460b9539 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
c0c23a60
RK
113An optional regexp may be specified, marked with an initial \fB~\fR.
114Only files with a basename matching the regexp will be returned.
460b9539 115.TP
116.B get \fITRACK\fR \fIKEY\fR
117Display the preference \fIKEY\fR for \fITRACK\fR.
3d1452ab 118See \fBdisorder_preferences\fR (5).
460b9539 119.TP
0d350ff0 120.B get\-global \fIKEY\fR
460b9539 121Get a global preference.
3d1452ab 122See \fBdisorder_preferences\fR (5).
460b9539 123.TP
0d350ff0 124.B get\-volume
0f55e905 125Display the current volume settings.
460b9539 126.TP
127.B length \fITRACK\fR
0f55e905 128Display the length of \fITRACK\fR in seconds.
460b9539 129.TP
130.B log
0f55e905 131Write event log messages to standard output, until the server is terminated.
460b9539 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
c0c23a60
RK
139within the queue.
140Positive values move towards the head of the queue, negative
460b9539 141values towards the tail.
142.IP
143Note that if you specify a negative value then the
0d350ff0 144.B \-\-
460b9539 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
c0c23a60
RK
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.
460b9539 154.TP
155.B pause
c0c23a60
RK
156Pause the current track.
157(Note that not all players support pausing.)
460b9539 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
58865bb5
RK
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
460b9539 182.B prefs \fITRACK\fR
183Display all the preferences for \fITRACK\fR.
3d1452ab 184See \fBdisorder_preferences\fR (5).
460b9539 185.TP
186.B queue
c0c23a60
RK
187List the current queue.
188The first entry in the list is the next track to play.
460b9539 189.TP
0d350ff0 190.B random\-disable
460b9539 191Disable random play.
192.TP
0d350ff0 193.B random\-enable
460b9539 194Enable random play.
195.TP
196.B recent
c0c23a60
RK
197List recently played tracks.
198The first entry is the oldest track, the last entry is the most
199recently played one.
460b9539 200.TP
e86021e4
RK
201.B reconfigure
202Make the daemon reload its configuration file.
863c04fa
RK
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.
e86021e4 208.TP
460b9539 209.B remove \fITRACK\fR
210Remove a track from the queue.
211.TP
e86021e4 212.B rescan
c0c23a60
RK
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.
e86021e4 216.TP
460b9539 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
0d350ff0 223.B rtp\-address
ca831831
RK
224Report the RTP brodcast address used by the server (if any).
225.TP
758aa6c3
RK
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
d436bd52
RK
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
758aa6c3
RK
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
460b9539 261.B scratch
262Scratch the currently playing track.
263.TP
0d350ff0 264.B scratch\-id \fIID\fR
460b9539 265Scratch the currently playing track, provided it has the given ID.
266.TP
267.B search \fITERMS\fR
c0c23a60
RK
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:
460b9539 271.IP
272.B "disorder search 'bowie china'"
273.IP
274You can limit the search to tracks with a particular tag, too, using the
c0c23a60
RK
275\fBtag:\fR modifier.
276For example:
460b9539 277.IP
ca831831 278.B "disorder search 'love tag:depressing'"
460b9539 279.TP
280.B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR
281Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR.
3d1452ab 282See \fBdisorder_preferences\fR (5).
460b9539 283.TP
0d350ff0 284.B set\-global \fIKEY\fR \fIVALUE\fR
460b9539 285Set a global preference.
3d1452ab 286See \fBdisorder_preferences\fR (5).
460b9539 287.TP
0d350ff0 288.B set\-volume \fBLEFT\fR \fBRIGHT\fR
0f55e905
RK
289Set the volume.
290.TP
0d350ff0 291.B setup\-guest \fR[\fB\-\-no\-online\-registration\fR]
c0c23a60
RK
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.
0f55e905 296.IP
0d350ff0 297With the option \fB\-\-no-online\-registration\fR, the "register" right is
0f55e905 298suppressed and users must be manually created by an administrator.
f1592969 299.IP
300If online registration is desired then \fBmail_sender\fR must be set in the
c0c23a60
RK
301configuration file.
302See \fBdisorder_config\fR(5).
460b9539 303.TP
e86021e4
RK
304.B shutdown
305Shut down the daemon.
306.TP
460b9539 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.
3d1452ab 315See \fBdisorder_preferences\fR (5).
460b9539 316.TP
0d350ff0 317.B unset\-global \fIKEY\fR
460b9539 318Unset the global preference \fIKEY\fR.
3d1452ab 319See \fBdisorder_preferences\fR (5).
460b9539 320.TP
90ad6c6e 321.B userinfo \fIUSERNAME PROPERTY
dfb27dd6
RK
322Get some property of a user.
323.TP
a55c70c7
RK
324.B users
325List known users.
326.TP
460b9539 327.B version
328Report the daemon's version number.
329.PP
330For
331.B move
332and
333.BR remove ,
c0c23a60
RK
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.
460b9539 337.SH NOTES
338.B disorder
c0c23a60
RK
339is locale-aware.
340If you do not set the locale correctly then it may not handle non-ASCII
341data properly.
460b9539 342.PP
e86021e4 343The client determines which user to attempt to authenticate as by examining the
c0c23a60
RK
344current UID.
345This can be overridden in a per-user configuration file, see
e86021e4
RK
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.)
460b9539 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
c0c23a60
RK
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:
460b9539 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
c0c23a60
RK
377for the formats recognized by the local installation.
378The filename matching is case-sensitive.
460b9539 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
c0c23a60
RK
388configuration file.
389The README recommends using \fBjukebox\fR for this purpose but it could
390be different locally.
460b9539 391.SH ENVIRONMENT
392.TP
8ab2aa9f
MW
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 .
af52ec84
MW
412Overridden by the
413.B \-u
414.RB ( \-\-user-config )
415command-line option.
8ab2aa9f
MW
416.TP
417.B DISORDER_USERCONFIG_SYS
418System-provided per-user configuration file to use instead of
419.BR $DISORDER_HOME/passwd .
420.TP
460b9539 421.B HOME
422The user's home directory.
423.TP
424.B LC_ALL\fR, \fBLANG\fR, etc
c0c23a60
RK
425Current locale.
426See \fBlocale\fR(7).
460b9539 427.SH FILES
428.TP
429.I pkgconfdir/config
c0c23a60
RK
430Global configuration file.
431See \fBdisorder_config\fR(5).
460b9539 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),
3d1452ab 440\fBpcrepattern\fR(3), \fBdisobedience\fR(1), \fBdisorder.cgi\fR(8),
9ce569e5 441\fBdisorder_preferences\fR(5)
460b9539 442.PP
443"\fBpydoc disorder\fR" for the Python API documentation.
444.\" Local Variables:
445.\" mode:nroff
446.\" fill-column:79
447.\" End: