Re: Disable Alt + Ctrl + Backspace selectively

From: Xin Li (xinli1_at_illinoisalumni.org)
Date: 01/28/04


Date: 28 Jan 2004 14:31:31 -0800

Hi,

The bigger picture behind this question is this. I am writing a
restrictive shell environment for linux. What I am writing will
basically replace the standard Gnome/KDE desktop and present a very
limit number of things that the user can do. The system will be
configured such that root will get the normal KDE/Gnome desktop, but
non-root users will only get our restrictive shell. So when you are
in this shell, things like Virtual terminals, multiple desktops and
Alt + Ctrl + Backspace should be disabled.

But it seems like that's not going to be possible, from what I've read
of this thread.

Xin Li

Kasper Dupont <kasperd@daimi.au.dk> wrote in message news:<40132A30.395AB943@daimi.au.dk>...
> Juergen Heinzl wrote:
> >
> > 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 -.
>
> I don't see any connection between the question and the
> answer. The question was about Ctrl + Alt + Backspace.
> The ctrlaltdel line in inittab is irrelevant. The kernel
> doesn't interpret keys because X is using the keyboard
> in raw mode. So the kernel will never notice Ctrl + Alt
> + Del being pressed.
>
> If you actually want shutdown to verify if root is
> logged in before rebooting, just use the -a option. But
> that of course doesn't help solving the problem.
>
> I don't know any way to change the behavioure of
> Ctrl + Alt + Backspace depending on the user logged in.
> The problem obviously is, that X doesn't know which
> user is logged in. And I don't understand why you would
> want to disable Ctrl + Alt + Backspace.