Hello again. On Wed, Apr 20, 2016 at 10:31:47AM +0200, Andreas Henriksson wrote: > Hello Marga Manterola. [...] > > if [ "$setterm_args" ]; then > > setterm $setterm_args > > fi [...]
Replying to myself as I should probably point out one of the most important flaws of the above quoted script... The setterm utility is a local administator utitily. It is supposed to be run in an *interactive* terminal. It will not work when run under a sanitized environment (e.g. stdin and stdout are not an open tty). This means the script has never worked under our default init system since Jessie, and who knows what else nowadays. Noone was interested in fixing it up for the jessie release and I doubt anyone will volunteer in the future either. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771161 for problem description and a workaround. I've already discussed with util-linux upstream about potentially adding a --tty flag to setterm and open fds to operate on when specified rather than using stdin/stdout, which was acked as an ok idea. I've not yet found the chance to implement this simple piece of code and send a patch to util-linux upstream during my copious free time. Anyone should feel free to implement this since it's pretty trivial and should be doable by anyone who has access to a simple "getting started with C programming" tutorial which there will be plenty of on the web. Alternatively if you consider this feature extremely important you could ofcourse consider paying me to implement it for you.... I hope I've shared enough information for interesting people to see what needs doing, so roll up your sleeves and get busy! Regards, Andreas Henriksson