Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
11-09-2005, 10:02 AM
|
#1
|
LQ Newbie
Registered: Nov 2005
Location: Germany
Posts: 3
Rep:
|
Own shortcut like Strg-Alt-Del
Hello,
first of all, I'm a  and sorry for my english!
is there a way to configure a shortcut, which works in every situation like Strg-Alt-Del(shutdown)?
I've seen the inittab, where you can set the command for this shutdown-shortcut, but i have to make my own one.
I hope the question is written correctly!
Please help
CommSter
|
|
|
11-09-2005, 11:58 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Your English is fine.
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:
alt keycode 103 = KeyboardSignal
|
|
|
11-10-2005, 03:54 AM
|
#3
|
LQ Newbie
Registered: Nov 2005
Location: Germany
Posts: 3
Original Poster
Rep:
|
Hello,
thank you for the fast reply.
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.
i hope the problem is plain.
CommSter
Last edited by commster; 11-10-2005 at 05:16 AM.
|
|
|
11-10-2005, 07:10 AM
|
#4
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
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.
|
|
|
11-11-2005, 06:37 AM
|
#5
|
LQ Newbie
Registered: Nov 2005
Location: Germany
Posts: 3
Original Poster
Rep:
|
Hi,
thx for your patience.
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???
I hope not to bother.
CommSter
|
|
|
All times are GMT -5. The time now is 08:06 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|