.TH IREXEC "1" "Last change: Oct 2015" "irexec 0.10.1" "User Commands" .SH NAME .P \fBirexe\fRc - run programs with one button press .SH SYNOPSIS .B irexec [\fIoptions\fR] [\fIconfig_file\fR] .SH DESCRIPTION .P \fBirexec\fR executes commands on an IR signal decoded by lircd, the LIRC daemon. It uses an lircrc config file where the \fI config = \fR entries are executed. E. g., given the following config file snippet .nf begin prog = irexec button = KEY_RED config = echo "KEY_RED" end .fi .P \fBirexec\fR will echo \fIKEY_RED\fR on the terminal when the corresponding button is pushed on a remote. The command is an arbitrary shell command executed asynchronously \- \fBirexec\fR does not wait for it to complete. .SH ARGUMENTS .TP 4 .B config_file lircrc configuration file. \fBirexec\fR only uses entries with \fIprog = irexec\fR. The path defaults to \fI~/.config/lircrc\fR. .SH OPTIONS .TP 4 .B -h, --help Display usage summary .TP 4 .B -v, --version Display version .TP 4 .B -d, --daemon Make irexec fork to background. In this case a config file should be given on the command line as irexec won't be able to find any home directory. .TP 4 \fB-D, --loglevel\fR [\fIlevel\fR] Determine the amount of logging information. [\fIlevel\fR] can be a symbolic syslog level: \fIerror\fR, \fIwarning\fR, \fIinfo\fR, \fInotice\fR or \fIdebug\fR. lirc also defines three additional levels \fItrace\fR, \fItrace\fR and \fItrace2\fR which gives even more messages (\fItrace2\fR bringing the most). However, in the log these messages are marked as \fIdebug\fR. By default, no logging is done. .TP 4 \fB-n, --name\fR <\fIname\fR> Use this program name instead of the default \fIirexec\fR as identifier in the lircd.conf file. .SH ENVIRONMENT .TP 4 .B LIRC_SOCKET_PATH Path to the lircd socket irexec reads from, defaults to /var/run/lirc/lircd. .SH FILES .TP 4 .B ~/.config/lircrc Default config file .TP 4 .B /etc/lirc/lircrc Config file used by the systemd irexec service. .TP 4 .B ~/.cache/irexec.log Debug log. Setting the XDG_CACHE_HOME environment variable relocates this file to $XDG_CACHE_HOME/irexec.log .SH NOTES .P For versions up to 0.9.1 \fBirexec\fR used to wait until the executed program terminated. Old configuration files thus often includes a '&' appended to the command string to avoid being stuck in the command. This is not required in 0.9.2+ which cannot wait for command completion. .P irexec should run as a service. The contrib directory contains a .desktop file which could be dropped in ~/.local/autostart. Doing so creates a service which can be handled by regular desktop tools such as \fIgnome\-tweak\-tool\fR on all major desktops. If running restricted commands such as powering off the machine is required, sudo(8) can be used to allow regular users to run such commands. .P An alternative is to use the irexec.service systemd service which runs as root (and can run in parallel with the desktop service). Running as root has severe security implications. See the Configuration Guide in the html documentation. .SH "SEE ALSO" .TP 4 .B lircrc(5) The lircrc configuration file.