Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Strg? - Must be what it is marked in Germany - on English keyboards its marked "Ctrl" so the sequence is Ctrl-Alt-Del.
Anyway ctrlaltdel is a special state of inittab (type "man inittab" for more detail). It appears from my read that it might be possible to define your own. Have a look at this from the inittab man page:
kbrequest
The process will be executed when init receives a
signal from the keyboard handler that a special key
combination was pressed on the console keyboard.
The documentation for this function is not complete
yet; more documentation can be found in the kbd-
x.xx packages (most recent was kbd-0.94 at the time
of this writing). Basically you want to map some
keyboard combination to the "KeyboardSignal"
action. For example, to map Alt-Uparrow for this
purpose use the following in your keymaps file:
You're right Strg is marked in Germany, so the hole sequence is Strg-Alt-Entf.
Strg -> Steuerung = Control
Entf -> Entfernen = Delete
What i need is more "global". I boot the system, but before the getty-processes start, i start my own daemon-proc,
a little program, where no input is needed instead of Ctrl-Alt-Del.
In future there will be another configurtion for this daemon and i need a shortcut to switch between the configurations.
If I understand your last post you are saying you do not want to define a special key sequence but rather just want to start a daemon automatically on boot. If you DO want to define a special key sequence you'll have to look at what I wrote before.
If however I am correct that all you want to do is start a daemon of your own:
Although you can start it from inittab you should not. This was the way most things were started back when I first started working on Unix (Linux is a Unix clone). Now however it is more usual to start things using init (rc) scripts. Mainly inittab is used to configure serial devices and to start very base level processes (including calling the rc setup).
You haven't listed your distro (distribution type) of Linux. For RedHat and some others the init scripts are in /etc/init.d (which may be a symbolic link to another directory). General setup:
1) /etc/init.d - Contains the script written for start/stop which may include other options such as status.
2) /etc/rc?.d - Contains symbolic links back to the files in /etc/init.d. The ? can be any run level (0,1,2,3,4) and the script within that run level is either run to start (if name begins with S) or to stop (if name begins with K) within that run level.
If you have a look at the scripts there you'll get an idea how it should be setup and there may be a template file for setting up a new one.
I have to define a special key sequence, and this allready works fine. (With the kbrequest-thing in inittab)
The problem now is, that i only have ONE kbrquest.
For example:
Ctrl+f -> starts the first shellscript ("kb:00001:kbrequest:sh first_script.sh")
Ctrl+s -> starts the second shellscript ("kb:00002:kbrequest:sh second_script.sh")
This is, what i want. And than i insert into my keymap something like:
control keycode "keycode for f" = KeyboardSignal(00001)
control keycode "keycode for s" = KeyboardSignal(00002)
Is there any way to do something like the above???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.