1 |
On 170511-19:57-0400, Walter Dnes wrote: |
2 |
> On Thu, May 11, 2017 at 04:19:28PM -0700, Daniel Campbell wrote |
3 |
> > On 05/10/2017 04:08 PM, Walter Dnes wrote: |
4 |
> > > On Wed, May 10, 2017 at 03:36:05PM -0400, Jonathan Callen wrote |
5 |
> > > |
6 |
> > >> Additionally, "setterm --blank force" turns the console off immediately. |
7 |
> > > |
8 |
> > > Thank you; that's exactly what I was looking for. My script |
9 |
> > > ~/bin/dark now reads... |
10 |
> > > |
11 |
> > > #!/bin/bash |
12 |
> > > sleep 1 && xset -display :0.0 dpms force off |
13 |
> > > setterm --blank force |
14 |
> > > |
15 |
> > > ...so I can execute "dark" in either X or a true text console, and it |
16 |
> > > works in both cases. |
17 |
> > > |
18 |
> > |
19 |
> > If I may suggest an enhancement, you might want to probe the |
20 |
> > environment the script is running in so that only the relevant command |
21 |
> > gets run; unless of course you really do want everything off at once |
22 |
> > regardless of whether X is running.. |
23 |
> |
24 |
> Isn't that the whole point of excercise? If I want to turn off the |
25 |
> display, I want to turn off the display. BTW, I've discovered a problem. |
26 |
> |
27 |
> sleep 1 && xset -display :0.0 dpms force off |
28 |
> |
29 |
> ...allows to bring back the display by tapping any key. I prefer |
30 |
> {SHIFT} because it doesn't do anything by itself. But the command... |
31 |
> |
32 |
> setterm --blank force |
33 |
> |
34 |
> ...can't be awoken from in a text console. However, if X is running in |
35 |
> tty7, I can {CTRL}{ALT}{F7} and X comes up. Then I can {CTRL}{ALT}{F1} |
36 |
> to get back to a text console in tty1... weird. |
37 |
Same here. |
38 |
|
39 |
> -- |
40 |
> Walter Dnes <waltdnes@××××××××.org> |
41 |
> I don't run "desktop environments"; I run useful applications |
42 |
> |
43 |
|
44 |
Good tips in this thread! |
45 |
|
46 |
Regards! |
47 |
-- |
48 |
Miroslav Rovis |
49 |
Zagreb, Croatia |
50 |
https://www.CroatiaFidelis.hr |