IREXEC(1)
π 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β thelircrcconfiguration file.irexeconly uses the entries whereprog = 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β makesirexecfork to the background. lowkey important: in this case you should hand it a config file right there on the command line, becauseirexecwon'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,noticeordebug. lirc also defines three additional levelstrace,traceandtrace2, which give even more messages (trace2bringing the most, obviously, it's the overachiever π). but heads up β in the log these messages are marked asdebug. by default, no logging is done.-n,--name <name>β use this program name as the identifier in thelircd.conffile instead of the defaultirexec.
πΈ ENVIRONMENT πΈ
LIRC_SOCKET_PATHβ path to thelircdsocket thatirexecreads from. defaults to/var/run/lirc/lircd.
π§ FILES π§
~/.config/lircrcβ the default config file β¨/etc/lirc/lircrcβ the config file used by the systemdirexecservice~/.cache/irexec.logβ the debug log. setting theXDG_CACHE_HOMEenvironment 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)β thelircrcconfiguration 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. ππ
π¦ where this page comes from
- alpine 3.24: lirc-doc 0.10.2-r4 Β· GPL-2.0-only
- debian trixie: lirc 0.10.2-0.10 Β· GPL-2.0-or-later
- fedora 43: lirc-core 0.10.2-4.fc43 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 43: lirc-core 0.10.2-4.fc43 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 44: lirc-core 0.10.2-5.fc44 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- fedora 44: lirc-core 0.10.2-5.fc44 Β· GPL-2.0-only AND LicenseRef-Callaway-BSD
- nixos 26.05: lirc 0.10.2
- nixpkgs unstable: lirc 0.10.2
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: lirc-core 0.10.2-160000.2.2 Β· GPL-2.0-or-later
- ubuntu noble: lirc 0.10.2-0.8build1 Β· GPL-2.0-or-later
- ubuntu questing: lirc 0.10.2-0.10build1
- ubuntu resolute: lirc 0.10.2-0.10ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: lirc 0.10.2-0.11 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms