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