1

I'm using stty susp ^- in a user's .bashrc shell in an attempt at preventing users from using CTRL+Z to background a process.

The reason behind this, is that we have a number of users who are used to using Oracle SQLPlus on VMS, and the default editor uses CTRL+Z to save and quit the editor. CTRL+Z on Linux obviously has a completely different action, and manages to completely baffle our users as they instinctively hit CTRL+Z.

Whilst stty susp ^- seems to work with some commands (e.g. top), it doesn't work when I really need it to, i.e. in editors such as nano or vim.

Can anyone suggest how I might achieve this?

Edit: I don't need to use bash, so an alternative shell that doesn't support job control should suffice (assuming such a shell exists).

Bryan
  • 7,538
  • 15
  • 68
  • 92

1 Answers1

3

To disable suspend (Ctrl+Z) functionality in nano, you can put unset suspend into the system global nanorc, which is most likely located at /etc/nanorc. See the nanorc(5) man page for details.

user
  • 4,267
  • 4
  • 32
  • 70
  • Glad I could help. Also note that this can probably be overriden on a per-user basis; for those brave souls who want to live dangerously, you may want to leave a little note hanging around somewhere. (I haven't tried that scenario.) – user Nov 22 '11 at 12:50