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