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