lcdexec(1)

πŸ’– lcdexec β€” the manual, but make it cute πŸ’–

okay bestie, so this is the manual page for lcdexec, straight out of the LCDproc suite. it's a whole vibe and i'm gonna walk you through every single bit of it, no skips, no cap. ✨


🌸 NAME 🌸

lcdexec β€” the LCDproc client that executes commands from the LCDd menu 🫢


✨ SYNOPSIS ✨

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

that's it, that's the whole summoning ritual πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so lcdexec connects to LCDd (that's the LCDproc server, the main character) and adds a submenu to the LCDd main menu. that submenu lets you pick commands and, like, actually run them. iconic behavior honestly.

you get to the menu by pressing the menu key configured for LCDd. go press it. i'll wait. πŸ’–


πŸŽ€ OPTIONS πŸŽ€

lcdexec understands these command line options, and heads up β€” they override the matching options you set in the config file. sorry not sorry, command line wins.

  • -c filename β€” set the name of the config file to read. defaults to /etc/lcdexec.conf πŸ“
  • -a address β€” set the address of the host that LCDd is running on. defaults to localhost πŸ’«
  • -p port β€” set the port LCDd is accepting connections on. defaults to 13666 πŸ”₯
  • -f β€” run in foreground. no backgrounding, we stay right here πŸ‘€
  • -r level β€” set the reporting level to level. it's an integer, and it maps to reporting levels from 0 (critical errors only) all the way up to 5 (debug messages). default is 2 (errors and warnings only) 🧚
  • -s bool β€” report to syslog (1) or to stdout (0, which is the default) 🌈

πŸ’œ USAGE πŸ’œ

bestie, it's not just the command line. lcdexec also takes options from a configuration file. two ways in, one glorious tool.

this file is expected to have a "INI-file" type format β€” sections introduced by section headers in square brackets, and option lines that are key=value pairs. classic.

section and option names may contain only characters from the range [a-zA-Z0-9_]. value strings, on the other hand, may contain any printable character. but here's the tea: value strings with characters outside the range [a-zA-Z0-9_] must be quoted with double quotes. and to get a double quote or backslashes inside the string, you have to escape them by putting a backslash in front. 🫑

the lcdexec config file needs at least two sections:

  • [lcdexec] β€” for the general options
  • [MainMenu] β€” for the top level of the menu hierarchy to be displayed

🌟 the [lcdexec] section 🌟

this section supports the following options:

  • Address=server β€” the host name or IP address of the LCDd server to connect to. if it's not given, server defaults to localhost.
  • Port=port β€” port of the server to connect to. the default value for port is 13666, the LCDproc port.
  • ReportLevel=level β€” set the reporting level to level, an integer representing reporting levels from 0 (critical errors only) to 5 (debug messages). default is 2 (errors and warnings only).
  • ReportToSyslog=bool β€” tells whether to report to syslog (TRUE) or to stderr (FALSE).
  • Foreground=bool β€” tells whether to run in foreground (TRUE) or in background (FALSE). if not given, the default is FALSE for daemon mode. slay, it daemonizes by default πŸ’…
  • DisplayName=Display β€” set the display name for the main menu. if not given, it defaults to lcdexec HOST, where HOST is the hostname of the system lcdexec is running on.
  • Shell=/path/to/shell β€” set the shell to use when executing programs. if not given, lcdexec tries to read the environment variable SHELL. if that fails, it defaults to /bin/sh. please note that the shell given here must understand the option -c followed by the command line to execute. don't get cute with a weird shell that doesn't do that. πŸ™ˆ

🌈 the [MainMenu] section and friends 🌈

the [MainMenu] section, plus every section it refers to, defines the menu hierarchy to be displayed. each menu and each menu entry in that hierarchy is defined as its own section. and whether a given section is a sub-menu or a command entry is decided by which option keys show up in that section. it's giving "your vibe tells us who you are."

menu / menu entry sections may contain these options:

  • Entry=entry β€” defines a menu entry entry, which is further specified in the section [entry]. sections that contain one or more Entry= options are menus.
  • Exec=command β€” defines the system command command to be executed when this entry gets selected. sections that contain an Exec= option are command entries.
  • DisplayName=name β€” the name of the menu entry to be displayed on the LCD. if this option is not given, the section header name is used (without the square brackets). so [EjectCD] shows up as EjectCD. noted.
  • Feedback=bool β€” in command entries, this option tells whether to inform the user that commands finished, using an alert screen on the display. if not given, it defaults to no.

πŸ“ FILES πŸ“

lcdexec.conf


πŸ‘‘ EXAMPLES πŸ‘‘

in the configfile:

## general options for lcdexec ##
[lcdexec]
# address of the LCDd server to connect to
Address=localhost

# Port of the server to connect to
Port=13666

# set reporting level
ReportLevel=2

# report to to syslog ?
ReportToSyslog=false

# run in foreground [default: false; legal: true, false]
Foreground=false

# display name for the main menu [default: lcdexec HOST]
#DisplayName=lcdexec

# main menu definition
[MainMenu]
# the Entry=... lines (one for each menu entry) tell it is a menu definition
Entry=EjectCD
Entry=ShutdownMenu

# definition of a command
[EjectCD]
# name to display in the menu instead of the section name
DisplayName="Eject CD-ROM"
# the Exec=... line tells that it is a command
Exec="umount /cdrom; cdeject"

# definition of a menu
[ShutdownMenu]
DisplayName="Shutdown menu"
# a menu contains an Entry=... line for each menu entry
Entry=Shutdown5min
Entry=Reboot5min
Entry=CancelShutdown
Entry=ShutdownNow
Entry=RebootNow

[Shutdown5min]
DisplayName="Shutdown in 5 minutes"
Exec="shutdown -h +5"
Feedback=yes

[Reboot5min]
DisplayName="Reboot in 5 minutes"
Exec="shutdown -r +5"
Feedback=yes

[CancelShutdown]
DisplayName="Cancel shutdown/reboot"
Exec="shutdown -c"
Feedback=yes

[ShutdownNow]
DisplayName="Shutdown now"
Exec="shutdown -h now"

[RebootNow]
DisplayName="Reboot now"
Exec="shutdown -r now"

start lcdexec with:

lcdexec -c /usr/local/etc/lcdexec.conf

this will let you eject the CD-ROM by opening the LCDd menu, selecting "lcdexec" and selecting "Eject CD-ROM". further, it lets you do various shutdowns, including the "Shutdown in 5 minutes" β€” by opening the LCDd menu, selecting "lcdexec", selecting "Shutdown menu" and then selecting "Shutdown in 5 minutes". the way that just works?? obsessed. πŸ˜­πŸ’–


πŸ’« SEE ALSO πŸ’«

LCDd(8)


🧚 AUTHOR 🧚

lcdexec is written by Joris Robijn and Peter Marschall. it's part of the LCDproc suite. πŸ’œ

the newest version of LCDproc should be available from here:

http://www.lcdproc.org/

LCDproc is released as "WorksForMe-Ware". in other words, it is free, kinda neat, and they don't guarantee that it will do anything in particular on any machine except the ones it was developed on. πŸ’€

it is technically released under the GNU GPL license (you should have received the file "COPYING" with LCDproc) (also, look on http://www.fsf.org/ for more information), so you can distribute and use it for free β€” but you must make the source code freely available to anyone who wants it. no gatekeeping the source, bestie.

for any sort of real legal information, read the GNU GPL (GNU General Public License). it's worth reading. fr fr. πŸ“–


and that's the whole page, babes 🌈✨ this was lcdexec(1) from the LCDproc manual, dated 24 March 2011 β€” yes she's a 2011 icon and she still slays. mwah, go run some commands off an LCD πŸ’…πŸ’–