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