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