--- lirc-0.9.0/tools/irxevent.c.orig 2012-03-28 17:37:58.603657279 +0900 +++ lirc-0.9.0/tools/irxevent.c 2012-03-28 17:41:20.432647800 +0900 @@ -131,6 +131,7 @@ static const char *root_window_name = "RootWindow"; static const char *progname = "irxevent"; +static char *lirc_progname = NULL; /* program name to react to, by default irxevent */ static Display *dpy; static Window root; static XEvent xev; @@ -550,6 +551,7 @@ } static struct option long_options[] = { + {"name", required_argument, NULL, 'n'}, {"daemon", no_argument, NULL, 'd'}, {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, @@ -566,8 +568,11 @@ int c; int WindowID; - while ((c = getopt_long(argc, argv, "dhV", long_options, NULL)) != EOF) { + while ((c = getopt_long(argc, argv, "n:dhV", long_options, NULL)) != EOF) { switch (c) { + case 'n': + lirc_progname = optarg; + continue; case 'd': bDaemon = 1; continue; @@ -605,7 +610,7 @@ // windows may get closed at wrong time. Override default error handler... XSetErrorHandler(errorHandler); - if (lirc_init("irxevent", 1) == -1) + if (lirc_init(lirc_progname?lirc_progname:progname, 1) == -1) exit(EXIT_FAILURE); if (lirc_readconfig(config_file, &config, check) == 0) { --- lirc-0.9.0/doc/man/irxevent.1.orig 2012-03-28 17:49:49.743623879 +0900 +++ lirc-0.9.0/doc/man/irxevent.1 2012-03-28 17:53:34.603613319 +0900 @@ -14,6 +14,9 @@ Irxevent is a complement to irexec and irpty. .TP +\fB\-n\fR \fB\-\-name\fR +program name in .lircrc for this irxevent instance +.TP \fB\-d\fR \fB\-\-daemon\fR fork and run in background .TP --- lirc-0.9.0/doc/html/irxevent.html.orig 2012-03-28 17:54:15.632611392 +0900 +++ lirc-0.9.0/doc/html/irxevent.html 2012-03-28 17:54:44.502610035 +0900 @@ -55,6 +55,7 @@

Irxevent is a complement to irexec and irpty.

+
-n --name
-d --daemon
fork and run in background
-h --help