Search code examples
rubuntuxfce

in R, under Ubuntu control-4 quits - why? how can I stop it?


In R, running under Ubuntu 11.10 with xfce4, if I accidentally type the key control-4, R quits immediately - no questions asked - which can be useful at times if I create a job that's just too big.

The trouble is that I occasionally accidentally hit ctrl-4 in the middle of work and lose it which is annoying.

How can I change this keycode to something else? or failing that just remove it altogether?

Thanks!


Solution

  • Ctrl-4 is sending the Unix Quit signal. Ctrl-\ will do it to.

    To disable in a shell, do:

    trap '' 3
    

    then run R, try ctrl-\ or ctrl-4 - but anything else you wan to SIGQUIT will ignore it in that shell. Send a SIGKILL instead (kill -9).