[ltp] Resolved- confused about power managment with T520 with Debian with no DE

Richard Neill linux-thinkpad@linux-thinkpad.org
Mon, 06 Feb 2012 16:24:57 +0000

> What is critical here is that you would need it on a shell script, and
> that doesn't work. (Thanks to Jochen for checking the file type!)

Yes, that can get a bit annoying. You can make shell scripts setuid, but 
only by making the interpreter /bin/bash  setuid!

This would be a terrible idea: it would make all bash scripts run as root.

Likewise, setuid in python and php is impossible. It used to be doable 
in perl, but the excellent perl-suid module was unfortunately deprecated 
by upstream.

You either have to use sudo, or create a tiny wrapper in C.

BTW, I wouldn't necessarily advise suspend on lid-close: there are 
sometimes times when you want to leave the system running with the lid 
closed. I tend to explicitly use Fn-F4 for suspend. Or at least set 
suspend to only occur on battery.

Best wishes,