1lcdexec(1)                       LCDproc suite                      lcdexec(1)
2
3
4

NAME

6       lcdexec - LCDproc client to execute commands from the LCDd menu
7

SYNOPSIS

9       lcdexec [-hf] [-c config] [-a addr] [-p port] [-r level] [-s bool]
10
11

DESCRIPTION

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

OPTIONS

19       lcdexec  understands the following command line options., that override
20       the corresponding 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

USAGE

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_],  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  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 occurring  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
123       Feedback=bool
124               In  command  entries,  this  option tells whether to inform the
125               user of the completion of commands using an alert screen on the
126               display.  If not given, it defaults to no.
127

FILES

129       lcdexec.conf
130
131

EXAMPLES

133       In the configfile:
134
135       ## general options for lcdexec ##
136       [lcdexec]
137       # address of the LCDd server to connect to
138       Address=localhost
139
140       # Port of the server to connect to
141       Port=13666
142
143       # set reporting level
144       ReportLevel=2
145
146       # report to to syslog ?
147       ReportToSyslog=false
148
149       # run in foreground [default: false; legal: true, false]
150       Foreground=false
151
152       # display name for the main menu [default: lcdexec HOST]
153       #DisplayName=lcdexec
154
155
156       # main menu definition
157       [MainMenu]
158       # the Entry=... lines (one for each menu entry) tell it is a menu definition
159       Entry=EjectCD
160       Entry=ShutdownMenu
161
162       # definition of a command
163       [EjectCD]
164       # name to display in the menu instead of the section name
165       DisplayName="Eject CD-ROM"
166       # the Exec=... line tells that it is a command
167       Exec="umount /cdrom; cdeject"
168
169       # definition of a menu
170       [ShutdownMenu]
171       DisplayName="Shutdown menu"
172       # a menu contains an Entry=... line for each menu entry
173       Entry=Shutdown5min
174       Entry=Reboot5min
175       Entry=CancelShutdown
176       Entry=ShutdownNow
177       Entry=RebootNow
178
179       [Shutdown5min]
180       DisplayName="Shutdown in 5 minutes"
181       Exec="shutdown -h +5"
182       Feedback=yes
183
184       [Reboot5min]
185       DisplayName="Reboot in 5 minutes"
186       Exec="shutdown -r +5"
187       Feedback=yes
188
189       [CancelShutdown]
190       DisplayName="Cancel shutdown/reboot"
191       Exec="shutdown -c"
192       Feedback=yes
193
194       [ShutdownNow]
195       DisplayName="Shutdown now"
196       Exec="shutdown -h now"
197
198       [RebootNow]
199       DisplayName="Reboot now"
200       Exec="shutdown -r now"
201
202
203       Start lcdexec with: lcdexec -c /usr/local/etc/lcdexec.conf
204
205
206       This  will  allow  you  to  eject  the CD-ROM by opening the LCDd menu,
207       selecting "lcdexec" and selecting "Eject CD-ROM".   Further  it  allows
208       you  to  do various shutdowns, among others the "Shutdown in 5 minutes"
209       by opening the LCDd  menu,  selecting  "lcdexec",  selecting  "Shutdown
210       menu" and selecting "Shutdown in 5 minutes".
211
212

SEE ALSO

214       LCDd(8)
215
216

AUTHOR

218       lcdexec  is  written by Joris Robijn and Peter Marschall. It is part of
219       the LCDproc suite.
220
221       The newest version of LCDproc should be available from here:
222
223                 http://www.lcdproc.org/
224
225
227       LCDproc is released as "WorksForMe-Ware".  In other words, it is  free,
228       kinda neat, and we don't guarantee that it will do anything in particu‐
229       lar on any machine except the ones it was developed on.
230
231       It is technically released under the GNU GPL license (you  should  have
232       received   the   file,   "COPYING",   with   LCDproc)  (also,  look  on
233       http://www.fsf.org/ for more information), so you  can  distribute  and
234       use  it  for free -- but you must make the source code freely available
235       to anyone who wants it.
236
237       For any sort of real legal information, read the GNU GPL  (GNU  General
238       Public License).  It's worth reading.
239
240
241
242LCDproc                          24 March 2011                      lcdexec(1)
Impressum