IREXEC(1)

πŸ“¦
version 0.10.2 Β· 3 versions
, in alpine 3.24, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– IREXEC β€” bestie's guide to one-button magic πŸ’–

okay so this is the irexec(1) manual page from the User Commands corner of the man-verse, and babes, it is so much fun. sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

irexec β€” run programs with one button press πŸ‘†πŸ”₯


🌈 SYNOPSIS 🌈

irexec [options] [config_file]

πŸ¦‹ DESCRIPTION πŸ¦‹

irexec runs commands when an IR signal gets decoded by lircd, which is the LIRC daemon, no cap. it reads an lircrc config file, and the config = entries in there are the ones it actually executes.

so like, say your config file has this little snippet:

begin
    prog   = irexec
    button = KEY_RED
    config = echo "KEY_RED"
end

then when you push the matching button on your remote, irexec will echo KEY_RED on your terminal. iconic. πŸ’…

the command is an arbitrary shell command, and it gets executed asynchronously β€” irexec does not sit around waiting for it to finish. it's giving main character energy, it's got places to be. ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • config_file β€” the lircrc configuration file. irexec only uses the entries where prog = irexec, so don't @ it with anything else. the path defaults to ~/.config/lircrc.

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” shows you the usage summary. your lil cheat sheet. 🫢
  • -v, --version β€” shows the version. slay.
  • -d, --daemon β€” makes irexec fork to the background. lowkey important: in this case you should hand it a config file right there on the command line, because irexec won't be able to find any home directory. 😭
  • -D, --loglevel [level] β€” sets how much logging info you get. [level] can be a symbolic syslog level: error, warning, info, notice or debug. lirc also defines three additional levels trace, trace and trace2, which give even more messages (trace2 bringing the most, obviously, it's the overachiever πŸ‘‘). but heads up β€” in the log these messages are marked as debug. by default, no logging is done.
  • -n, --name <name> β€” use this program name as the identifier in the lircd.conf file instead of the default irexec.

🌸 ENVIRONMENT 🌸

  • LIRC_SOCKET_PATH β€” path to the lircd socket that irexec reads from. defaults to /var/run/lirc/lircd.

🧚 FILES 🧚

  • ~/.config/lircrc β€” the default config file ✨
  • /etc/lirc/lircrc β€” the config file used by the systemd irexec service
  • ~/.cache/irexec.log β€” the debug log. setting the XDG_CACHE_HOME environment variable relocates this file to $XDG_CACHE_HOME/irexec.log

⭐ NOTES ⭐

okay history lesson, bestie πŸ“œ β€” for versions up to 0.9.1, irexec used to wait until the executed program terminated. that's why old configuration files often have a '&' appended to the command string, just to avoid getting stuck in the command. that is not required in 0.9.2+, because it cannot wait for command completion anymore. periodt.

irexec should run as a service. the contrib directory contains a .desktop file which you could drop 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. and if you need to run restricted commands like powering off the machine, sudo(8) can be used to let regular users run such commands. 🫢

an alternative is 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 πŸ˜­πŸ’€ β€” please actually read the Configuration Guide in the html documentation.

πŸ”₯ SEE ALSO πŸ”₯

  • lircrc(5) β€” the lircrc configuration file.

and that's the whole page, bestie!! πŸŽ€βœ¨

this was irexec version 0.10.2, with the last change way back in Oct 2015 β€” vintage but still serving πŸ’œ. love u, go press some buttons. πŸ‘‘πŸ’–