(get rid of those pseudo options named 'Arguments' in the config file) - replace printf / printf calls by debug / report calls in some drivers - sort and extend LCDd.conf
412 lines
9.4 KiB
Plaintext
412 lines
9.4 KiB
Plaintext
<chapter id="configuration">
|
|
<title>LCDproc Configuration</title>
|
|
|
|
<sect1 id="configure-lcdd">
|
|
<title>Configure LCDd</title>
|
|
|
|
<para>
|
|
As mentioned in the <link linkend="introduction">introduction</link>
|
|
LCDd, the LCDproc server, now (with version 0.4.3 of LCDproc) has its
|
|
own configuration file, which is normally <filename>/etc/LCDd.conf</filename>.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
If you have not installed LCDproc from the sources the configuration
|
|
file might have a different location. You should find it when making
|
|
your system's package manager list all the files in the LCDproc package.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
The format of the <filename>/etc/LCDd.conf</filename> is ini-file-like.
|
|
</para>
|
|
<para>
|
|
It is divided into sections that start at
|
|
markers that look like [section]. Comments are all line-based comments,
|
|
and are lines that start with '#' or ';'.
|
|
</para>
|
|
|
|
<para>
|
|
The server has a 'central' section named [server]. Further each driver
|
|
has a section which defines how the driver acts. Those sections start with
|
|
[drivername].
|
|
</para>
|
|
<para>
|
|
<anchor id="which-driver" />The drivers are activated by specifiying them in a driver= line in the
|
|
server section, like:
|
|
</para>
|
|
|
|
<example>
|
|
<title><filename>LCDd.conf</filename>: Specify which driver to use</title>
|
|
<programlisting>
|
|
|
|
Driver=curses
|
|
|
|
</programlisting>
|
|
</example>
|
|
|
|
<para>
|
|
This tells LCDd to use the curses driver. The first driver specified here
|
|
that is capable of output functionality will be used as 'the' output driver.
|
|
All extra drivers can only serve as input.
|
|
The default driver to use is curses.
|
|
</para>
|
|
|
|
<warning>
|
|
<para>
|
|
If LCDd is started automatically by an init-script using the curses driver
|
|
will lock <filename>/dev/tty1</filename>! So, be careful about what you are
|
|
doing here.
|
|
</para>
|
|
</warning>
|
|
|
|
<para>
|
|
The drivers read their own options from the config file.
|
|
For this purpose they use the config sections that are named like the driver.
|
|
</para>
|
|
|
|
<para>
|
|
<command>LCDd -d driver</command>
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
The -d option still works, but does not allow driverargs any more.
|
|
</para>
|
|
<para>
|
|
If -d is specified on the command line, the Driver= options in the
|
|
config file are ignored.
|
|
</para>
|
|
</note>
|
|
|
|
<sect2 id="server-section">
|
|
<title><filename>LCDd.conf</filename>: The [server] Section</title>
|
|
|
|
<para>
|
|
The [server] section of the <filename>LCDd.conf</filename> contains the
|
|
settings for the LCDproc server <application>LCDd</application>.
|
|
</para>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>Driver=</term>
|
|
<listitem>
|
|
<para>
|
|
Tells the server which driver(s) to use. See
|
|
<link linkend="which-driver">above</link> for details
|
|
</para>
|
|
<note>
|
|
<para>
|
|
The default setting is Driver=none which makes the server exit right
|
|
after the start. This is neccessary to avoid trouble with package installations.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>Bind=</term>
|
|
<listitem>
|
|
<para>
|
|
Tells the server to bind to the given interface. Default to Bind=127.0.0.1 which
|
|
is actually the safest variant.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>Port=</term>
|
|
<listitem>
|
|
<para>
|
|
Tells the server to listen to this specified port; defaults to 13666.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>ReportLevel=</term>
|
|
<listitem>
|
|
<para>
|
|
Sets the reporting level; defaults to 2 (warnings and errors only).
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>ReportToSyslog=</term>
|
|
<listitem>
|
|
<para>
|
|
Should we report to syslog instead of stderr ? Defaults to no.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>WaitTime=
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Sets the default time in seconds to display a screen.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>User=
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
User to run as. LCDd will drop its root privileges,
|
|
if any, and run as this user instead. Defaults to User=nobody.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
If you want to use the server menu, to shutdown or reboot your system,
|
|
you will have to set this to root. Otherwise LCDd does not have the
|
|
privileges to run commands like <command>init 6</command>.
|
|
</para>
|
|
</note>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>ServerScreen=
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Enables the server screen even when other screens are active. Defaults to
|
|
no.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>Foreground=</term>
|
|
<listitem>
|
|
<para>
|
|
The server will stay in the foreground if set to true.
|
|
Otherwise the server will fork to background and report
|
|
to syslog. Defaults to yes.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
<sect2 id="input-section">
|
|
<title><filename>LCDd.conf</filename>: The [input] Section</title>
|
|
|
|
<para>
|
|
The [input] section enables you to set some general ("global")
|
|
options related to the way <application>LCDd</application> handles
|
|
input "events".
|
|
</para>
|
|
|
|
<table>
|
|
<title>The Standard LCDd Input Keys</title>
|
|
<tgroup cols="3">
|
|
<thead>
|
|
<row>
|
|
<entry>Keyname</entry>
|
|
<entry>Function</entry>
|
|
</row>
|
|
<row>
|
|
<entry></entry>
|
|
<entry>Normal context</entry>
|
|
<entry>Menu context</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>PauseKey</entry>
|
|
<entry>Pause/Continue</entry>
|
|
<entry>Enter/select</entry>
|
|
</row>
|
|
<row>
|
|
<entry>BackKey</entry>
|
|
<entry>Back (Go to previous screen)</entry>
|
|
<entry>Up/Left</entry>
|
|
</row>
|
|
<row>
|
|
<entry>ForwardKey</entry>
|
|
<entry>Forward (Go to next screen)</entry>
|
|
<entry>Down/Right</entry>
|
|
</row>
|
|
<row>
|
|
<entry>MainMenuKey</entry>
|
|
<entry>Open main menu</entry>
|
|
<entry>Exit/Cancel</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
<note>
|
|
<para>
|
|
The way input keys are handled will change completely in LCDproc 0.5.
|
|
</para>
|
|
</note>
|
|
|
|
|
|
<sect3 id="freekeyoptions">
|
|
<title><filename>LCDd.conf</filename>: [input] Section: The Free*Key Options</title>
|
|
|
|
<para>
|
|
The Free*Key Options are interesting for those users whose keypad (or other input source)
|
|
has got only four (or less) keys. In this case LCDd would normally use all those
|
|
keys to enable you to control the server menu and the other server functions (like
|
|
switching to the next screen). If these keys are used by a client to do anything
|
|
but noticing that the user has e.g. entered the menu or switched to another screen,
|
|
this will probably cause trouble, as one keypress has several effects at the same
|
|
time.
|
|
</para>
|
|
<para>
|
|
The Free*Key options enable you to influence this behaviour.
|
|
</para>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>FreePauseKey=</term>
|
|
<listitem>
|
|
<para>
|
|
If set to yes, this prevents LCDd from handling the PauseKey itself.
|
|
Then a client can request the key 'A' and handle it.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>FreeBackKey=</term>
|
|
<listitem>
|
|
<para>
|
|
If set to yes, this prevents LCDd from handling the BackKey itself.
|
|
Then a client can request the key 'B' and handle it.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term>FreeForwardKey=</term>
|
|
<listitem>
|
|
<para>
|
|
If set to yes, this prevents LCDd from handling the ForwardKey itself.
|
|
Then a client can request the key 'C' and handle it.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>FreeMainMenuKey=</term>
|
|
<listitem>
|
|
<para>
|
|
If set to yes, this prevents LCDd from handling the MainMenuKey itself.
|
|
Then a client can request the key 'D' and handle it.
|
|
</para>
|
|
<tip>
|
|
<para>
|
|
Even if you "free" the above keys, you can still use the menu
|
|
provided you set FreeMainMenuKey to no.
|
|
</para>
|
|
</tip>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 id="drivers-section">
|
|
<title><filename>LCDd.conf</filename>: The Drivers Section</title>
|
|
|
|
<para>
|
|
As mentioned earlier, each driver has its own section in the
|
|
<filename>LCDd.conf</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
The settings are more or less self-explanatory. So, read through the
|
|
section of your driver and change everything neccessary.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|
|
<sect1 id="init-scripts">
|
|
<title>The LCDproc Init Scripts</title>
|
|
|
|
<para>
|
|
The LCDproc distribution contains init scripts for RedHat- and Debian-based
|
|
GNU/Linux distributions. You can find them in the <filename>docs/</filename>
|
|
directory of the LCDproc sources.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
The init scripts are generated using autoconf. So, again it is important that
|
|
you have run <command>./configure</command> with the correct options for your
|
|
system.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
Refer to your system's manual on how to install the scripts.
|
|
</para>
|
|
|
|
<sect2 id="init-lcdd">
|
|
<title>init-LCDd</title>
|
|
<para>
|
|
The file <filename>scripts/init-LCDd.*</filename> is the init script for the
|
|
LCDproc server LCDd. It does not require modification.
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 id="init-lcdproc">
|
|
<title>init-lcdproc</title>
|
|
<para>
|
|
The file <filename>scripts/init-lcdproc.*</filename> is the init script for the
|
|
LCDproc "main" client lcdproc. As lcdproc itself does not (yet) have a configuration file
|
|
you may want to modify the options the init script passes to lcdproc.
|
|
</para>
|
|
|
|
<note>
|
|
<para>
|
|
You can retrieve a listing of all options of lcdproc running <command>lcdproc --help</command>.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
The lcdproc init script retrieves the options it will pass to lcdproc from the file
|
|
<filename>/etc/lcdproc.conf</filename> (<filename>scripts/lcdproc.conf</filename> in the
|
|
sources distribution).
|
|
</para>
|
|
|
|
<example>
|
|
<title><filename>lcdproc.conf</filename>: Modify the option passed to lcdproc</title>
|
|
<programlisting>
|
|
|
|
# /etc/lcdproc.conf
|
|
#
|
|
# Configuration file of the main LCDproc client "lcdproc"
|
|
# NOTE: The configuration file of LCDd is /etc/LCDd.conf
|
|
|
|
# Set SCREENS to the screens you want lcdproc to send to LCDd
|
|
# lcdproc --help will give you a list of the screens available
|
|
|
|
SCREENS="C X"
|
|
|
|
</programlisting>
|
|
</example>
|
|
|
|
<para>
|
|
In this example lcdproc will only send information on the CPU usage [C] and system load [X] to the server.
|
|
</para>
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|
|
|
|
</chapter>
|