LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to enter a password before running script, with you irda remote controller ? (https://www.linuxquestions.org/questions/linux-general-1/how-to-enter-a-password-before-running-script-with-you-irda-remote-controller-599093/)

frenchn00b 11-12-2007 12:24 PM

How to enter a password before running script, with you irda remote controller ?
 
Hi,

As I have a lirc remote controller, I would like that irexec launch a script when I press the "Enter value" key, that read 6 key inputs and if the 6 keys inputs are valid, starts me a script (program bash/sh script).

Is that possible ?

Pearlseattle 11-17-2007 08:06 AM

I think so - using a script that fires up a shell like xterm - but you'll have to disable some security settings of the shell in order to make it accept the input - this should be mentioned, as far as I remember, somewhere in the lirc docs.

ps.: found it
here

Quote:

There are programs that do not accept any synthetic X-events by default because they can cause security problems. Currently xterm and xemacs are known to ignore events simulated by irxevent.

You can however make xterm accept external events by enabling "Allow SendEvents" in the "Main Options" (hold down the Ctrl button and press the left mouse button inside the xterm window). You can as well place this line into your .Xresources file to change this permanently:

XTerm.vt100.allowSendEvents: true

Yet another possibility is to start xterm like this:

xterm -xrm "XTerm.vt100.allowSendEvents: true"


All times are GMT -5. The time now is 09:55 AM.