Commit | Line | Data |
---|---|---|
460b9539 | 1 | .\" |
5aff007d | 2 | .\" Copyright (C) 2004-2008 Richard Kettlewell |
460b9539 | 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 ] | |
0d350ff0 | 25 | .RB [ \-\- ] |
460b9539 | 26 | .RI [ COMMANDS ...] |
460b9539 | 27 | .SH DESCRIPTION |
460b9539 | 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 | |
c0c23a60 RK |
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. | |
460b9539 | 38 | .SH OPTIONS |
39 | .TP | |
0d350ff0 | 40 | .B \-\-config \fIPATH\fR, \fB\-c \fIPATH |
c0c23a60 RK |
41 | Set the configuration file. |
42 | The default is | |
460b9539 | 43 | .IR pkgconfdir/config . |
44 | .TP | |
0d350ff0 | 45 | .B \-\-debug\fR, \fB\-d |
460b9539 | 46 | Enable debugging. |
47 | .TP | |
0d350ff0 | 48 | .B \-\-help\fR, \fB\-h |
460b9539 | 49 | Display a usage message. |
50 | .TP | |
0d350ff0 | 51 | .B \-\-version\fR, \fB\-V |
460b9539 | 52 | Display version number. |
53 | .TP | |
0d350ff0 | 54 | .B \-\-help\-commands\fR, \fB\-H |
460b9539 | 55 | List all known commands. |
56 | .SH COMMANDS | |
57 | .TP | |
90ad6c6e | 58 | .B adduser \fIUSERNAME PASSWORD\fR [\fIRIGHTS\fR] |
c0c23a60 RK |
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. | |
0f55e905 | 62 | .TP |
90ad6c6e RK |
63 | .B authorize \fIUSERNAME\fR [\fIRIGHTS\fR] |
64 | Create user \fIUSERNAME\fR with a random password. | |
65 | User \fIUSERNAME\fR must be a UNIX login user (not just any old string). | |
c0c23a60 RK |
66 | If \fIRIGHTS\fR is not specified then the \fBdefault_rights\fR |
67 | setting from the server's configuration file applies. | |
e86021e4 | 68 | .IP |
90ad6c6e | 69 | \fI~USERNAME/.disorder/passwd\fR is created with the password in it, so the new |
5b14453f RK |
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 | |
c0c23a60 RK |
73 | created in DisOrder's user database. |
74 | Use \fBdisorder deluser\fR to remove them before trying again. | |
e86021e4 | 75 | .TP |
90ad6c6e | 76 | .B deluser \fIUSERNAME\fR |
a55c70c7 RK |
77 | Delete a user. |
78 | .TP | |
460b9539 | 79 | .B dirs \fIDIRECTORY\fR [\fB~\fIREGEXP\fR] |
80 | List all the directories in \fIDIRECTORY\fR. | |
81 | .IP | |
c0c23a60 RK |
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. | |
460b9539 | 84 | .TP |
85 | .B disable | |
0f55e905 | 86 | Disable playing after the current track finishes. |
460b9539 | 87 | .TP |
90ad6c6e | 88 | .B edituser \fIUSERNAME PROPERTY VALUE |
a55c70c7 RK |
89 | Set some property of a user. |
90 | .TP | |
460b9539 | 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 | |
c0c23a60 RK |
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. | |
460b9539 | 99 | .TP |
100 | .B get \fITRACK\fR \fIKEY\fR | |
101 | Display the preference \fIKEY\fR for \fITRACK\fR. | |
102 | .TP | |
0d350ff0 | 103 | .B get\-global \fIKEY\fR |
460b9539 | 104 | Get a global preference. |
105 | .TP | |
0d350ff0 | 106 | .B get\-volume |
0f55e905 | 107 | Display the current volume settings. |
460b9539 | 108 | .TP |
109 | .B length \fITRACK\fR | |
0f55e905 | 110 | Display the length of \fITRACK\fR in seconds. |
460b9539 | 111 | .TP |
112 | .B log | |
0f55e905 | 113 | Write event log messages to standard output, until the server is terminated. |
460b9539 | 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 | |
c0c23a60 RK |
121 | within the queue. |
122 | Positive values move towards the head of the queue, negative | |
460b9539 | 123 | values towards the tail. |
124 | .IP | |
125 | Note that if you specify a negative value then the | |
0d350ff0 | 126 | .B \-\- |
460b9539 | 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 | |
c0c23a60 RK |
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. | |
460b9539 | 136 | .TP |
137 | .B pause | |
c0c23a60 RK |
138 | Pause the current track. |
139 | (Note that not all players support pausing.) | |
460b9539 | 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 | |
c0c23a60 RK |
151 | List the current queue. |
152 | The first entry in the list is the next track to play. | |
460b9539 | 153 | .TP |
0d350ff0 | 154 | .B random\-disable |
460b9539 | 155 | Disable random play. |
156 | .TP | |
0d350ff0 | 157 | .B random\-enable |
460b9539 | 158 | Enable random play. |
159 | .TP | |
160 | .B recent | |
c0c23a60 RK |
161 | List recently played tracks. |
162 | The first entry is the oldest track, the last entry is the most | |
163 | recently played one. | |
460b9539 | 164 | .TP |
e86021e4 RK |
165 | .B reconfigure |
166 | Make the daemon reload its configuration file. | |
167 | .TP | |
460b9539 | 168 | .B remove \fITRACK\fR |
169 | Remove a track from the queue. | |
170 | .TP | |
e86021e4 | 171 | .B rescan |
c0c23a60 RK |
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. | |
e86021e4 | 175 | .TP |
460b9539 | 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 | |
0d350ff0 | 182 | .B rtp\-address |
ca831831 RK |
183 | Report the RTP brodcast address used by the server (if any). |
184 | .TP | |
758aa6c3 RK |
185 | .B schedule-del \fIEVENT\fR |
186 | Delete a scheduled event. | |
187 | .TP | |
188 | .B schedule-list | |
189 | List scheduled events. | |
190 | Each line contains the ID, a timestamp, 'N' or 'J' for normal or junk priority, | |
191 | the user, the action and action-specific data. | |
192 | .TP | |
193 | .B schedule-play \fIWHEN PRIORITY TRACK\fI | |
194 | Play \fITRACK\fR at time \fIWHEN\fR (which must currently be a raw \fBtime_t\fR | |
195 | value). | |
196 | .IP | |
197 | \fIPRIORITY\fR should be \fBjunk\fR or \fBnormal\fR. | |
198 | This determines how the event is handled if it becomes due when the server is | |
199 | down. | |
200 | Junk events are just discarded in this case, while normal events will be | |
201 | executed when the server comes back up, even if this is much later. | |
202 | .TP | |
203 | .B schedule-set-global \fIWHEN PRIORITY NAME VALUE\fI | |
204 | Set global preference \fINAME\fR to \fIVALUE\fR at time \fIWHEN\fR. | |
205 | .TP | |
206 | .B schedule-unset-global \fIWHEN PRIORITY NAME\fI | |
207 | Unset global preference \fINAME\fR at time \fIWHEN\fR. | |
208 | .TP | |
460b9539 | 209 | .B scratch |
210 | Scratch the currently playing track. | |
211 | .TP | |
0d350ff0 | 212 | .B scratch\-id \fIID\fR |
460b9539 | 213 | Scratch the currently playing track, provided it has the given ID. |
214 | .TP | |
215 | .B search \fITERMS\fR | |
c0c23a60 RK |
216 | Search for tracks containing all of the listed terms. |
217 | The terms are separated by spaces and form a single argument, | |
218 | so must be quoted, for example: | |
460b9539 | 219 | .IP |
220 | .B "disorder search 'bowie china'" | |
221 | .IP | |
222 | You can limit the search to tracks with a particular tag, too, using the | |
c0c23a60 RK |
223 | \fBtag:\fR modifier. |
224 | For example: | |
460b9539 | 225 | .IP |
ca831831 | 226 | .B "disorder search 'love tag:depressing'" |
460b9539 | 227 | .TP |
228 | .B set \fITRACK\fR \fIKEY\fR \fIVALUE\fR | |
229 | Set the preference \fIKEY\fR for \fITRACK\fR to \fIVALUE\fR. | |
230 | .TP | |
0d350ff0 | 231 | .B set\-global \fIKEY\fR \fIVALUE\fR |
460b9539 | 232 | Set a global preference. |
233 | .TP | |
0d350ff0 | 234 | .B set\-volume \fBLEFT\fR \fBRIGHT\fR |
0f55e905 RK |
235 | Set the volume. |
236 | .TP | |
0d350ff0 | 237 | .B setup\-guest \fR[\fB\-\-no\-online\-registration\fR] |
c0c23a60 RK |
238 | Create the "guest" user for use by the web interface. |
239 | This user will have no password and will only have the "read" and | |
240 | "register" rights, the latter allowing new users to automatically | |
241 | register themselves via the web interface. | |
0f55e905 | 242 | .IP |
0d350ff0 | 243 | With the option \fB\-\-no-online\-registration\fR, the "register" right is |
0f55e905 | 244 | suppressed and users must be manually created by an administrator. |
f1592969 | 245 | .IP |
246 | If online registration is desired then \fBmail_sender\fR must be set in the | |
c0c23a60 RK |
247 | configuration file. |
248 | See \fBdisorder_config\fR(5). | |
460b9539 | 249 | .TP |
e86021e4 RK |
250 | .B shutdown |
251 | Shut down the daemon. | |
252 | .TP | |
460b9539 | 253 | .B stats |
254 | List server statistics. | |
255 | .TP | |
256 | .B tags | |
257 | List known tags. | |
258 | .TP | |
259 | .B unset \fITRACK\fR \fIKEY\fR | |
260 | Unset the preference \fIKEY\fR for \fITRACK\fR. | |
261 | .TP | |
0d350ff0 | 262 | .B unset\-global \fIKEY\fR |
460b9539 | 263 | Unset the global preference \fIKEY\fR. |
264 | .TP | |
90ad6c6e | 265 | .B userinfo \fIUSERNAME PROPERTY |
dfb27dd6 RK |
266 | Get some property of a user. |
267 | .TP | |
a55c70c7 RK |
268 | .B users |
269 | List known users. | |
270 | .TP | |
460b9539 | 271 | .B version |
272 | Report the daemon's version number. | |
273 | .PP | |
274 | For | |
275 | .B move | |
276 | and | |
277 | .BR remove , | |
c0c23a60 RK |
278 | tracks may be specified by name or by ID. |
279 | If you use the name and a track appears twice in the queue it is | |
280 | undefined which is affected. | |
460b9539 | 281 | .SH PREFERENCES |
c0c23a60 RK |
282 | Currently the following preferences are supported. |
283 | Some are expected to be set by users, others updated automatically by plugins. | |
460b9539 | 284 | .TP |
285 | .B pick_at_random | |
286 | If this preference is present and set to "0" then the track will not | |
c0c23a60 RK |
287 | be picked for random play. |
288 | Otherwise it may be. | |
460b9539 | 289 | .TP |
290 | .B played | |
c0c23a60 RK |
291 | A decimal integer giving the number times the track was played. |
292 | This includes tracks that are scratched or were picked at random. | |
460b9539 | 293 | .TP |
294 | .B played_time | |
295 | The last time the track was played, as a \fBtime_t\fR converted to a | |
296 | decimal integer. | |
297 | .TP | |
298 | .B scratched | |
299 | The number of times the track has been scratched. | |
300 | .TP | |
301 | .B requested | |
302 | A decimal integer giving the number of times the track was requested. | |
303 | (Tracks that are removed before being played are not counted.) | |
304 | .TP | |
305 | .B tags | |
c0c23a60 RK |
306 | Tags that apply to this track, separated by commas. |
307 | Tags can contain any printing character except comma. | |
308 | Leading and trailing spaces are not significant but internal spaces are. | |
460b9539 | 309 | .IP |
310 | Using the | |
0d350ff0 | 311 | .B required\-tags |
460b9539 | 312 | and |
0d350ff0 | 313 | .B prohibited\-tags |
460b9539 | 314 | global preferences, it is possible to limit the tracks that will be selected at |
315 | random. | |
316 | .TP | |
317 | .B trackname_\fICONTEXT\fB_\fIPART\fR | |
318 | These preferences can be used to override the filename parsing rules | |
c0c23a60 RK |
319 | to find a track name part. |
320 | For backwards compatibility, \fBtrackname_\fIPART\fR will be used | |
321 | if the full version is not present. | |
460b9539 | 322 | .TP |
323 | .B unscratched | |
324 | The number of times the track has been played to completion without | |
325 | being scratched. | |
36a1a882 RK |
326 | .TP |
327 | .B weight | |
328 | The weight for this track. Weights are non-negative integers which determine | |
329 | the relative likelihood of a track being picked at random (i.e. if track A has | |
330 | twice the weight of track B then it is twice as likely to be picked at random). | |
331 | A track with weight 0 will not be picked at random, though \fBpick_at_random\fR | |
332 | is a more sensible way to configure this. | |
333 | .IP | |
334 | The default weight, used if no weight is set or the weight value is invalid, is | |
335 | 90000. Note that many other factors than track weight affect whether a track | |
336 | will be played - tracks already in the queue will not be picked at random for | |
337 | instance. | |
338 | .IP | |
339 | The maximum allowed weight is 2147483647. If you set a larger value it will be | |
340 | clamped to this value. Negative weights will be completely ignored and the | |
341 | default value used instead. | |
460b9539 | 342 | .SH NOTES |
343 | .B disorder | |
c0c23a60 RK |
344 | is locale-aware. |
345 | If you do not set the locale correctly then it may not handle non-ASCII | |
346 | data properly. | |
460b9539 | 347 | .PP |
e86021e4 | 348 | The client determines which user to attempt to authenticate as by examining the |
c0c23a60 RK |
349 | current UID. |
350 | This can be overridden in a per-user configuration file, see | |
e86021e4 RK |
351 | \fBdisorder_config\fR(5). |
352 | .PP | |
353 | See \fBdisorder_protocol\fR(5) for the rights required to run each command. | |
354 | (For instance, \fBshutdown\fR requires the \fBadmin\fR right, which most users | |
355 | would not normally have.) | |
460b9539 | 356 | .PP |
357 | This program is not intended to run in a setuid environment. | |
358 | .PP | |
359 | The regexp syntax used by the \fBfiles\fR and \fBdirs\fR commands use the | |
c0c23a60 RK |
360 | syntax described in \fBpcrepattern\fR(3). |
361 | Matching is case-independent. | |
362 | It is strongly recommended that you quote regexps, since they often | |
363 | contain characters treated specially by the shell. | |
364 | For example: | |
460b9539 | 365 | .PP |
366 | .B "disorder dirs /Music ~'^(?!the [^t])t'" | |
367 | .SH TROUBLESHOOTING | |
368 | If you cannot play a track, or it does not appear in the database even after a | |
369 | rescan, check the following things: | |
370 | .TP | |
371 | .B . | |
372 | Are there any error messages in the system log? The server logs to | |
373 | \fBLOG_DAEMON\fR, which typically ends up in | |
374 | .I /var/log/daemon.log | |
375 | or | |
376 | .IR /var/log/messages , | |
377 | though this depends on local configuration. | |
378 | .TP | |
379 | .B . | |
380 | Is the track in a known format? Have a look at | |
381 | .I pkgconfdir/config | |
c0c23a60 RK |
382 | for the formats recognized by the local installation. |
383 | The filename matching is case-sensitive. | |
460b9539 | 384 | .TP |
385 | .B . | |
386 | Do permissions on the track allow the server to read it? | |
387 | .TP | |
388 | .B . | |
389 | Do the permissions on the containing directories allow the server to read and | |
390 | execute them? | |
391 | .PP | |
392 | The user the server runs as is determined by the \fBuser\fR directive in the | |
c0c23a60 RK |
393 | configuration file. |
394 | The README recommends using \fBjukebox\fR for this purpose but it could | |
395 | be different locally. | |
460b9539 | 396 | .SH ENVIRONMENT |
397 | .TP | |
398 | .B LOGNAME | |
399 | The default username. | |
400 | .TP | |
401 | .B HOME | |
402 | The user's home directory. | |
403 | .TP | |
404 | .B LC_ALL\fR, \fBLANG\fR, etc | |
c0c23a60 RK |
405 | Current locale. |
406 | See \fBlocale\fR(7). | |
460b9539 | 407 | .SH FILES |
408 | .TP | |
409 | .I pkgconfdir/config | |
c0c23a60 RK |
410 | Global configuration file. |
411 | See \fBdisorder_config\fR(5). | |
460b9539 | 412 | .TP |
413 | .I ~/.disorder/passwd | |
414 | Per-user password file | |
415 | .TP | |
416 | .I pkgstatedir/socket | |
417 | Communication socket for \fBdisorder\fR(1). | |
418 | .SH "SEE ALSO" | |
419 | \fBdisorderd\fR(8), \fBdisorder_config\fR(5), \fBsyslog\fR(3), \fBtime\fR(2), | |
5c1ae3bc | 420 | \fBpcrepattern\fR(3), \fBdisobedience\fR(1), \fBdisorder.cgi\fR(8) |
460b9539 | 421 | .PP |
422 | "\fBpydoc disorder\fR" for the Python API documentation. | |
423 | .\" Local Variables: | |
424 | .\" mode:nroff | |
425 | .\" fill-column:79 | |
426 | .\" End: |