Re: Disable Alt + Ctrl + Backspace selectively

From: Juergen Heinzl (juergen_at_monocerus.manannan.org)
Date: 01/25/04


Date: Sat, 24 Jan 2004 23:01:11 +0000 (UTC)

In article <ed455a08.0401231245.56b475bf@posting.google.com>, Xin Li wrote:
> Hi,
>
> I would like to configure my system some how so that when non root
> users logon, the system disables Alt + Ctrl + Backspace from killing
> X. But when root is logged on, ALt + Ctrl + Backspace should work as
> usual. I know a DontZap entry in Xconfig will disable it for
> everyone. But this needs to be a bit more selective. So it seems
> like I have to write some kind of a program that will look at key
> strokes and filter out Alt + Ctrl + Backspace combinations.
[-]
Here's my entry ...
ca::ctrlaltdel:/sbin/shutdown -F -t0 -r now
...

Of course you don't want to run shutdown here but instead you'd
need to read /var/run/utmp to see whether root's logged in (see
utmp(5) for more) and the process id of the X server can be
found in /tmp/.X0-lock.

Mind though all that isn't going to handle the case of someone
having done a su -.

Cheers,
Juergen

-- 
\ Real name     : Juergen Heinzl       \       no flames      /
 \ Email private : juergen@manannan.org \ send money instead /
  \ Photo gallery : www.manannan.org     \                  /