I am isolating less trusted programs that need access to x (such as web browsers) with this method.
https://wiki.gentoo.org/wiki/Simple_sandbox
But any program that has access to my x session can log all keys from that
session by doing xinput test <keyboard-id>. This is usually an acceptable
risk provided the isolated programs are not that likely to be compromised.
But, when typing passwords, I would like to make it impossible for them to
listen in. Two simple ways of doing this would be (i) shutting them down and
(ii) typing passwords in a different tty. But that's a bit inconvenient. As
far as I can see, suspending every program run by unprivileged
users would be preferable. Is there a shell command that will suspend every
program running under the user bob?