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