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