LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 11-09-2005, 10:02 AM   #1
commster
LQ Newbie
 
Registered: Nov 2005
Location: Germany
Posts: 3

Rep: Reputation: 0
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
 
Old 11-09-2005, 11:58 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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
 
Old 11-10-2005, 03:54 AM   #3
commster
LQ Newbie
 
Registered: Nov 2005
Location: Germany
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 11-10-2005, 07:10 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 11-11-2005, 06:37 AM   #5
commster
LQ Newbie
 
Registered: Nov 2005
Location: Germany
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl + Alt + Del ? funkenbooty Linux - Newbie 7 04-26-2007 06:20 AM
cntrl-alt-del? DJOtaku Linux - General 4 02-04-2005 04:46 PM
Ctrl+Alt+Del, without login nny0000 Slackware 1 02-24-2004 09:53 PM
ctrl, alt, del hornet74 Linux - Software 8 01-13-2004 08:06 PM
How do I intercept CTRL+ALT+DEL? phil1076 Linux - General 2 12-09-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration