IREXEC(1) | User Commands | IREXEC(1) |
irexec - run programs with one button press
irexec [options] [config_file]
irexec executes commands on an IR signal decoded by lircd, the LIRC daemon. It uses an lircrc config file where the config = entries are executed. E. g., given the following config file snippet
begin
prog = irexec
button = KEY_RED
config = echo "KEY_RED"
end
irexec will echo KEY_RED on the terminal when the corresponding button is pushed on a remote. The command is an arbitrary shell command executed asynchronously - irexec does not wait for it to complete.
For versions up to 0.9.1 irexec 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.
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 gnome-tweak-tool 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.
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.
Last change: Oct 2015 | irexec 0.10.1 |