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