On 05/10/2017 04:08 PM, Walter Dnes wrote: > On Wed, May 10, 2017 at 03:36:05PM -0400, Jonathan Callen wrote > >> Additionally, "setterm --blank force" turns the console off immediately. > > Thank you; that's exactly what I was looking for. My script > ~/bin/dark now reads... > > #!/bin/bash > sleep 1 && xset -display :0.0 dpms force off > setterm --blank force > > ...so I can execute "dark" in either X or a true text console, and it > works in both cases. >
If I may suggest an enhancement, you might want to probe the environment the script is running in so that only the relevant command gets run; unless of course you really do want everything off at once regardless of whether X is running.. -- Daniel Campbell - Gentoo Developer OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6
signature.asc
Description: OpenPGP digital signature