Re: control headless box with key presses



Manuel Panea wrote:
Hi. I have a "headless" Linux box (i.e. without a monitor and a
keyboard) which is working fine. Now I would like to be able to hook
up a USB numpad and be able to execute some scripts by pressing some
keys, e.g. pressing key "1" would execute "Script_1" and so on.

Hooking up the USB numpad and loading the appropriate USB kernel
modules should be no problem, but how do I do that pressing a key
executes a command? "Usually" a tty driver would control the keyboard,
but I don't even want to log in, I just want to plug the keyboard in,
press a key and a command gets executed.

Thank you for any ideas.

-- Manuel Panea

start a getty..or write/mod your own...and attach it to the keyboard as part of the initialisation script.

If you start it up with a permission as a standard user, rather than root, and patch it to not require a password ..and get it to exec a shell, it will do what you want.

.



Relevant Pages

  • control headless box with key presses
    ... up a USB numpad and be able to execute some scripts by pressing some ... Hooking up the USB numpad and loading the appropriate USB kernel ... "Usually" a tty driver would control the keyboard, ... press a key and a command gets executed. ...
    (comp.os.linux.setup)
  • Re: Windows xp screen freezing...randomly
    ... Enquire, plan and execute ... After it finished booting plug in the keyboard ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Windows xp screen freezing...randomly
    ... Enquire, plan and execute ... After it finished booting plug in the keyboard ...
    (microsoft.public.windowsxp.help_and_support)
  • RE: Problem Overriding Word menu items using VSTO 2005... Shortcuts no
    ... The code that you've implemented essentially allows you to hook the click ... event of the Paste button, however, using the CTRL+V keyboard shortcut to ... execute the paste would not execute the click event of the Paste menu item ... override the CTRL+V shortcut. ...
    (microsoft.public.vsnet.vstools.office)
  • Re: beyond ascii in suse linux 9.3
    ... Plus, if i install more than one keyboard layout, ... >> so that I won't have to execute a terminal session once in kde so that ... > I've yet to figure an easy way for this, since I may want Spanish, French ... > or German and English in one document. ...
    (alt.os.linux.suse)