[ltp] Mails from ATI about the Suspend-To-Ram problem with fglrx drivers

Greg K linux-thinkpad@linux-thinkpad.org
Wed, 13 Apr 2005 12:17:41 -0700


At 10:59 AM 4/13/2005, you wrote:

>Yes, but it won't be as easy as you might expect.  X captures a number
>of key combinations directly; Ctrl-Alt- (Backspace, keypad+, keypad-,
>F[1-12].).  The xorg.conf options "DontZap", "DontVTSwitch", and
>"DontZoom" can make X ignore those key combinations.  You could
>theoretically put the DontVTSwitch option in your xorg.conf, then use
>xbindkeys to execute a shell script when you pressed Ctrl-Alt-F? .
>
>The real problem is that the shell script thus executed may not be able
>to do "chvt N", since root (not the user) probably owns the vt that X
>is running on.  I suppose you could make chvt SUID, though....

A nicer way to do that is to add some config lines to enable the user to 
call chvt via sudo. That allows you to limit the escalation possible to 
that command (versus SUID where the script can do anything that root can.)

e.g. in the /etc/sudoers file I added the following to allow a server to 
list iptables rules

# create a command alias specification
# list any iptable chain
Cmnd_Alias   IPTABLES_L = /usr/sbin/iptables -x -v -n --line-numbers -Z -L *

# allows jetty user to list iptables
jetty   ALL=NOPASSWD: IPTABLES_L