1lcdexec(1) LCDproc suite lcdexec(1)
2
3
4
6 lcdexec - LCDproc client to execute commands from the LCDd menu
7
9 lcdexec [-hf] [-c config] [-a addr] [-p port] [-r level] [-s bool]
10
11
13 lcdexec connects to LCDd (the LCDproc server) and adds a submenu to the
14 LCDd main menu that allows the user to select commands to be executed.
15 You can access the menu by pressing the menu key configured for LCDd.
16
17
19 lcdexec understands the following command line options., that override
20 the icorresponding options given in the configuration file:
21
22 -c filename
23 Set the name of the config file to read, /etc/lcdexec.conf by
24 default
25
26 -a address
27 Set the address of the host which LCDd is running on, localhost
28 by default
29
30 -p port Set the port which LCDd is accepting connections on, 13666 by
31 default
32
33 -f Run in foreground.
34
35 -r level
36 Set the reporting level to level, which is an integer repre‐
37 senting the reporting levels from 0 (critical errors only) to 5
38 (debug messages). Default is 2 (errors and warnings only)
39
40 -s bool Report to syslog (1) or to stdout (0, default)
41
43 In addition to the command line options listed above lcdexec also takes
44 options from a configuration file.
45
46 This file is expected to have a "INI-file" like format with sections
47 introduced by section headers in square brackets and options lines con‐
48 sisting of key=value pairs.
49
50 Section and option names may contain only characters from the range [a-
51 za-Z0-9_]i, while value strings may contain any printable character.
52 Value strings with characters outside the range [a-za-Z0-9_] must be
53 quoted with double quotes. To get a double quote or backslashes in the
54 string, they must be escaped by preceding it by a backslash.
55
56 The lcdexec configuration file needs at least two sections:
57
58 [lcdexec]
59 for the general options
60
61 [MainMenu]
62 for the top level of the menu hierarchy to be displayed.
63
64 The [lcdexec] section supports the following options:
65
66 Address=server
67 The host name or IP address of the LCDd server to connect to.
68 If not given, server defaults to localhost.
69
70 Port=port
71 Port of the server to connect to. The default value for port
72 is 13666, the LCDproc port.
73
74 ReportLevel=level
75 Set the reporting level to level, which is an integer repre‐
76 senting the reporting levels from 0 (critical errors only) to 5
77 (debug messages). Default is 2 (errors and warnings only)
78
79 ReportToSyslog=bool
80 Tell whether to report to syslog (TRUE) or to stderr (FALSE).
81
82 Foreground=bool
83 Tell whether to run in fore foreground (TRUE) or in background
84 (FALSE). If not given, the default is FALSE for daemon mode.
85
86 DisplayName=Display
87 Set the display name for the main menu. If not given it
88 defaults to lcdexec HOST, where HOST is the hostname of the
89 system lcdexec is running on.
90
91 Shell=/path/to/shell
92 Set the shell to use when executing programs. If not given,
93 lcdexec tries to read the environment variable SHELL. If that
94 fails, it defaults to /bin/sh. Please note that the shell
95 given here must understand the option -c followed by the com‐
96 mand line to execute.
97
98 The [MainMenu] section and the sections it refers to define the menu
99 hierarchy to be displayed. Each menu and each menu entry in the menu
100 hierarchy is defined as its own section. Whether a given section is a
101 sub-menu or a command entry is defined by the option keys occuring in
102 the section.
103
104 Menu / menu entry sections may contain the following options:
105
106 Entry=entry
107 Defines a menu entry entry which is further specified in the
108 section [entry].
109
110 Sections containing one or more Entry= options are menus.
111
112 Exec=command
113 Defines the system command command to be executed when this
114 entry gets selected.
115
116 Sections containing an Exec= option are command entries.
117
118 DisplayName=name
119 The name of the menu entry to be displayed on the LCD. If this
120 option is not given, the the section header name is used (with‐
121 out the square brackets).
122
124 lcdexec.conf
125
126
128 In the configfile:
129
130 ## general options for lcdexec ##
131 [lcdexec]
132 # address of the LCDd server to connect to
133 Address=localhost
134
135 # Port of the server to connect to
136 Port=13666
137
138 # set reporting level
139 ReportLevel=2
140
141 # report to to syslog ?
142 ReportToSyslog=false
143
144 # run in foreground [default: false; legal: true, false]
145 Foreground=false
146
147 # display name for the main menu [default: lcdexec HOST]
148 #DisplayName=lcdexec
149
150
151 # main menu definition
152 [MainMenu]
153 # the Entry=... lines (one for each menu entry) tell it is a menu definition
154 Entry=EjectCD
155 Entry=ShutdownMenu
156
157 # definition of a command
158 [EjectCD]
159 # name to display in the menu instead of the section name
160 DisplayName="Eject CD-ROM"
161 # the Exec=... line tells that it is a command
162 Exec="umount /cdrom; cdeject"
163
164 # definition of a menu
165 [ShutdownMenu]
166 DisplayName="Shutdown menu"
167 # a menu contains an Entry=... line for each menu entry
168 Entry=Shutdown5min
169 Entry=Reboot5min
170 Entry=CancelShutdown
171 Entry=ShutdownNow
172 Entry=RebootNow
173
174 [Shutdown5min]
175 DisplayName="Shutdown in 5 minutes"
176 Exec="shutdown -h +5"
177
178 [Reboot5min]
179 DisplayName="Reboot in 5 minutes"
180 Exec="shutdown -r +5"
181
182 [CanclShutdown]
183 DisplayName="Cancel shutdown/reboot"
184 Exec="shutdown -c"
185
186 [ShutdownNow]
187 DisplayName="Shutdown now"
188 Exec="shutdown -h now"
189
190 [RebootNow]
191 DisplayName="Reboot now"
192 Exec="shutdown -r now"
193
194
195 Start lcdexec with: lcdexec -c /usr/local/etc/lcdexec.conf
196
197
198 This will allow you to eject the CD-ROM by opening the LCDd menu,
199 selecting "lcdexec" and selecting "Eject CD-ROM". Further it allows
200 you to do various shutdowns, among others the "Shutdown in 5 minutes"
201 by opening the LCDd menu, selecting "lcdexec", selecting "Shutdown menu
202 " and selecting "Shutdown in 5 minutes".
203
204
206 lcdexec is wriitten by Joris Robijn and Peter Marschall. It is part of
207 the LCDproc suite.
208
209 The newest version of LCDproc should be available from here:
210
211 http://www.lcdproc.org/
212
213
215 LCDproc is released as "WorksForMe-Ware". In other words, it is free,
216 kinda neat, and we don't guarantee that it will do anything in particu‐
217 lar on any machine except the ones it was developed on.
218
219 It is technically released under the GNU GPL license (you should have
220 received the file, "COPYING", with LCDproc) (also, look on
221 http://www.fsf.org/ for more information), so you can distribute and
222 use it for free -- but you must make the source code freely available
223 to anyone who wants it.
224
225 For any sort of real legal information, read the GNU GPL (GNU General
226 Public License). It's worth reading.
227
228
229
230LCDproc 18 June 2006 lcdexec(1)