529 lines
14 KiB
Plaintext
529 lines
14 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>
|
|
<command>Driver=</command>
|
|
<arg choice="plain"><replaceable>DRIVERNAME</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Tells the server which driver(s) to use. See
|
|
<link linkend="which-driver">above</link> for details.
|
|
If not specified <replaceable>DRIVERNAME</replaceable>
|
|
defaults to <literal>curses</literal>, a driver that is supposed
|
|
to work on any half-way decent UNIX console.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>Bind=</command>
|
|
<arg choice="plain"><replaceable>ADDRESS</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Tells the server to bind to the given local IP address and listen for incoming client connections.
|
|
The default value for <replaceable>ADDRESS</replaceable> is <literal>127.0.0.1</literal>, which
|
|
is actually the safest variant.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>Port=</command>
|
|
<arg choice="plain"><replaceable>PORTNUMBER</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Tells the server to listen to this specified port.
|
|
If not specified <replaceable>PORTNUMBER</replaceable> defaults to <literal>13666</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>ReportLevel=</command>
|
|
<arg choice="plain"><replaceable>LEVEL</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Sets the reporting level.
|
|
Legal values for <replaceable>LEVEL</replaceable> range from <literal>0</literal>
|
|
(only critical errors) to <literal>5</literal> (everything including debugging information).
|
|
If not specified it defaults to <literal>2</literal> (warnings and errors only).
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>ReportToSyslog=</command>
|
|
<arg choice="plain">
|
|
<group choice="req">
|
|
<arg choice="plain"><literal><emphasis>no</emphasis></literal></arg>
|
|
<arg choice="plain"><literal>yes</literal></arg>
|
|
</group>
|
|
</arg>
|
|
</term>
|
|
<listitem><para>
|
|
Should we report to <filename>syslog</filename> instead of <filename>stderr</filename>?
|
|
Default value is <literal>no</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>WaitTime=</command>
|
|
<arg choice="plain"><replaceable>SECONDS</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Sets the default time in seconds to display a screen.
|
|
If not specified the default value for <replaceable>SECONDS</replaceable> is <literal>4</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>User=</command>
|
|
<arg choice="plain"><replaceable>USER</replaceable></arg>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
User to run as. When started as root LCDd will drop its privileges,
|
|
and run as this user instead. Defaults to <literal>nobody</literal>.
|
|
</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>
|
|
<command>ServerScreen=</command>
|
|
<arg choice="plain">
|
|
<group choice="req">
|
|
<arg choice="plain"><literal><emphasis>yes</emphasis></literal></arg>
|
|
<arg choice="plain"><literal>no</literal></arg>
|
|
</group>
|
|
</arg>
|
|
</term>
|
|
<listitem><para>
|
|
Include the server screen, that shows the number of active clients and screens,
|
|
into the screen rotation scheme when other screens exist.
|
|
Defaults to <literal>yes</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>Foreground=</command>
|
|
<arg choice="plain">
|
|
<group choice="req">
|
|
<arg choice="plain"><literal><emphasis>no</emphasis></literal></arg>
|
|
<arg choice="plain"><literal>yes</literal></arg>
|
|
</group>
|
|
</arg>
|
|
</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 <literal>no</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
|
|
<para>
|
|
The "...Key=" lines define what the server does with keypresses that
|
|
don't go to any client.
|
|
</para>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>
|
|
<command>ToggleRotateKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Defaults to <literal>Enter</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>PrevScreenKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Defaults to <literal>Left</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>NextScreenKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Defaults to <literal>Right</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>ScrollUpKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Defaults to <literal>Up</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>ScrollDownKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
Defaults to <literal>Down</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
<sect2 id="menu-section">
|
|
<title><filename>LCDd.conf</filename>: The [menu] Section</title>
|
|
|
|
<para>
|
|
The [menu] 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>MenuKey</entry>
|
|
<entry>Open main menu</entry>
|
|
<entry>Exit/Cancel</entry>
|
|
</row>
|
|
<row>
|
|
<entry>EnterKey</entry>
|
|
<entry>Toggle Hold/Rotate screens</entry>
|
|
<entry>Enter/Select</entry>
|
|
</row>
|
|
<row>
|
|
<entry>UpKey</entry>
|
|
<entry>Back (Go to previous screen)</entry>
|
|
<entry>Up/Left</entry>
|
|
</row>
|
|
<row>
|
|
<entry>DownKey</entry>
|
|
<entry>Forward (Go to next screen)</entry>
|
|
<entry>Down/Right</entry>
|
|
</row>
|
|
<row>
|
|
<entry>LeftKey</entry>
|
|
<entry>Back (Go to previous screen)</entry>
|
|
<entry>Left</entry>
|
|
</row>
|
|
<row>
|
|
<entry>RightKey</entry>
|
|
<entry>Forward (Go to next screen)</entry>
|
|
<entry>Right</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
-->
|
|
|
|
<para>
|
|
The menu is an LCDproc client built into <application>LCDd</application>.
|
|
You can configure what keys the menu should use.
|
|
Note that the <literal>MenuKey</literal> will be reserved exclusively,
|
|
while the others work in shared mode.
|
|
</para>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>
|
|
<command>MenuKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
The key that switches into menu mode (=open the main menu).
|
|
In menu mode it cancels any operation. Cancelling the main menu
|
|
means returning to the regular display mode.
|
|
It defaults to <literal>Menu</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>EnterKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
The key to enter a sub menu and/or, to select an entry.
|
|
It defaults to <literal>Enter</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>UpKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
The key to move to the previous menu item.
|
|
If the <replaceable>LeftKey</replaceable> is not set,
|
|
it is also used to move left in input fields.
|
|
It default to <literal>Up</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>DownKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
The key to move to the next menu item.
|
|
If the <replaceable>RightKey</replaceable> is not set,
|
|
it is also used to move right in input fields.
|
|
It default to <literal>Down</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>LeftKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
If defined, this optional key is used to
|
|
to move left in input fields and to select submenu entries.
|
|
It is not set by default, but if you have more than 4 keys,
|
|
a natural candidate is <literal>Left</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<command>RightKey=</command>
|
|
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
|
</term>
|
|
<listitem><para>
|
|
If defined, this optional key is used to to move right in input fields.
|
|
It is not set by default, but if you have more than 4 keys,
|
|
a natural candidate is <literal>Right</literal>.
|
|
</para></listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="driver-section">
|
|
<title><filename>LCDd.conf</filename>: The Driver Section</title>
|
|
|
|
<para>
|
|
As mentioned earlier, each driver has its own section in the
|
|
<filename>LCDd.conf</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
Although the settings are more or less self-explanatory,
|
|
they are explained in the next chapter in the section for each driver.
|
|
So, read through the section of your driver and changei
|
|
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>scripts/</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 L"
|
|
|
|
</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>
|