On 170511-19:57-0400, Walter Dnes wrote:
> On Thu, May 11, 2017 at 04:19:28PM -0700, Daniel Campbell wrote
> > 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..
> 
>   Isn't that the whole point of excercise?  If I want to turn off the
> display, I want to turn off the display.  BTW, I've discovered a problem.
> 
> sleep 1 && xset -display :0.0 dpms force off
> 
> ...allows to bring back the display by tapping any key.  I prefer
> {SHIFT} because it doesn't do anything by itself.  But the command...
> 
> setterm --blank force
> 
> ...can't be awoken from in a text console.  However, if X is running in
> tty7, I can {CTRL}{ALT}{F7} and X comes up.  Then I can {CTRL}{ALT}{F1}
> to get back to a text console in tty1... weird.
Same here.

> -- 
> Walter Dnes <waltd...@waltdnes.org>
> I don't run "desktop environments"; I run useful applications
> 

Good tips in this thread!

Regards!
-- 
Miroslav Rovis
Zagreb, Croatia
https://www.CroatiaFidelis.hr

Attachment: signature.asc
Description: Digital signature

Reply via email to