* [gentoo-user] Disabling job control in bash
@ 2008-11-09 21:20 Alan McKinnon
2008-11-10 0:39 ` [gentoo-user] " Christer Ekholm
0 siblings, 1 reply; 3+ messages in thread
From: Alan McKinnon @ 2008-11-09 21:20 UTC (permalink / raw
To: gentoo-user
Hi all,
I need to disable job control on a machine with 650+ users because way too
many of them believe that Ctrl-Z is how you kill processes. So, I want Ctrl-Z
to basically do nothing. I've found a great solution:
set +m
on the command line this enables monitor mode, disables job control and makes
sure that Ctrl-Z does nothing. It's a perfect solution, as of these 650+
users, at least 200 are experienced on Unix and can be trusted. If they
decide to use zsh, or run 'set -m' or undo this setting in their profile,
then they obviously know enough to be trusted and equally obviously know how
to use job control. They can then do that with my complete blessing.
But 'set +m' does not have the intended effect in the shell start up files
(*profile) and bash does not seem to have a command line switch to enable it.
Does anyone know how to get the effect of set +m when bash starts?
alan
p.s. various other solutions have been tried such as recompiling bash and
putting the original outside the regular PATH, disabling the Ctrl-Z keystroke
entirely, and using a restricted shell. None of these are suitable, I've
already tried and they cause insane amounts of toruble for valid users. 'set
+m' is exactly what I want, I just need to get it to work :-)
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-user] Re: Disabling job control in bash
2008-11-09 21:20 [gentoo-user] Disabling job control in bash Alan McKinnon
@ 2008-11-10 0:39 ` Christer Ekholm
2008-11-10 19:57 ` Alan McKinnon
0 siblings, 1 reply; 3+ messages in thread
From: Christer Ekholm @ 2008-11-10 0:39 UTC (permalink / raw
To: gentoo-user; +Cc: Alan McKinnon
Alan McKinnon <alan.mckinnon@gmail.com> writes:
> Hi all,
>
> I need to disable job control on a machine with 650+ users because way
> too many of them believe that Ctrl-Z is how you kill processes. So, I
> want Ctrl-Z to basically do nothing. I've found a great solution:
>
> set +m
One other way could perhaps be to tell the terminal not to send suspend
on Ctrl-Z keypress
stty susp undef
--
Christer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] Re: Disabling job control in bash
2008-11-10 0:39 ` [gentoo-user] " Christer Ekholm
@ 2008-11-10 19:57 ` Alan McKinnon
0 siblings, 0 replies; 3+ messages in thread
From: Alan McKinnon @ 2008-11-10 19:57 UTC (permalink / raw
To: gentoo-user
On Monday 10 November 2008 02:39:47 Christer Ekholm wrote:
> Alan McKinnon <alan.mckinnon@gmail.com> writes:
> > Hi all,
> >
> > I need to disable job control on a machine with 650+ users because way
> > too many of them believe that Ctrl-Z is how you kill processes. So, I
> > want Ctrl-Z to basically do nothing. I've found a great solution:
> >
> > set +m
>
> One other way could perhaps be to tell the terminal not to send suspend
> on Ctrl-Z keypress
>
> stty susp undef
Contrary to my expectations, this suggestion worked a treat :-)
I'd explored stty previously - unfortunately I don't remember the exact
invocations I used - and wasn't happy with the outcome.
Thanks for the tip!
--
alan dot mckinnon at gmail dot com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-10 19:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-09 21:20 [gentoo-user] Disabling job control in bash Alan McKinnon
2008-11-10 0:39 ` [gentoo-user] " Christer Ekholm
2008-11-10 19:57 ` Alan McKinnon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox