Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Disable ctrl+c in console
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ranmakun
Guru
Guru


Joined: 06 Nov 2002
Posts: 372
Location: Buenos Aires - Argentina

PostPosted: Sun Jun 06, 2004 4:43 pm    Post subject: Disable ctrl+c in console Reply with quote

This is my problem, I have an application that runs un the console (with frame buffer) and I've noticed that if I press ctrl+c it goes out of it, thats very annoying. I need to disable that, I've searched google groups and found that I could do:
Code:
stty intr ""

To disable the ctrl+c combination of keys, and, if I ping my machine for example it works fine. But it doesn't affect my application and I still can quit with ctrl+c.
The programs I'm using are AdvanceMAME and AdvanceMENU. In X this doesn't happen, but the machine where I'm using this doesn't use X.

Is there a way to do disable this other than the one I've just tried?, do you know why isn't that way working?, Any other ideas?
Thank you.
Back to top
View user's profile Send private message
edgarguzman
n00b
n00b


Joined: 07 Jan 2004
Posts: 45
Location: Guatemala

PostPosted: Sun Jun 06, 2004 7:12 pm    Post subject: Reply with quote

Try with CTRL+Z folowing CTRL+C
Back to top
View user's profile Send private message
Negated Void
l33t
l33t


Joined: 25 Dec 2002
Posts: 659

PostPosted: Sun Jun 06, 2004 7:48 pm    Post subject: Reply with quote

He dosn't want to USE ctrl c, he wants to diable it!
Back to top
View user's profile Send private message
Anior
Guru
Guru


Joined: 17 Apr 2003
Posts: 317
Location: European Union (Stockholm / Sweden)

PostPosted: Mon Jun 07, 2004 9:23 am    Post subject: Reply with quote

ctrl-c is interpreted by bash. A quick and dirty way of disabling it (and all other escape keys) would be to no run bash underneath. Either make advancemenu your default shell (but make sure that you have a seperate user to do other things with) or use exec. Exec forks, then kills the parent, useful for a lot of stuff. Course you will have to login again when your done with mame.
Code:
exec advancemenu
Back to top
View user's profile Send private message
ranmakun
Guru
Guru


Joined: 06 Nov 2002
Posts: 372
Location: Buenos Aires - Argentina

PostPosted: Mon Jun 07, 2004 2:33 pm    Post subject: Reply with quote

Anior wrote:
ctrl-c is interpreted by bash. A quick and dirty way of disabling it (and all other escape keys) would be to no run bash underneath. Either make advancemenu your default shell (but make sure that you have a seperate user to do other things with) or use exec. Exec forks, then kills the parent, useful for a lot of stuff. Course you will have to login again when your done with mame.
Code:
exec advancemenu


Unfortunatelly, none of the two solutions worked, with ctrl+c it catches the break and returns to the login prompt.
The only solution I found till now is to modify the source to catch the signal and don't do anything. But I'd like to find something that I can use without having to modify the source in every update.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum