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