This is a multi-part message in MIME format.
Em 06/07/2021 23:51, José Figueiredo escreveu:
Pessoal, boa noite.
Fiz um servidor, usando Debian 10 em um notebook antigo que tenho - a instalação está ultra limpa - apenas a instalação do netinstall com um acesso SSH.
A dificuldade está em que a tela fica 100% do tempo ligada, o que é
inútil pois faço todo acesso remotamente. Gostaria de dicas de como desativar a tela - tipo descanso de tela em modo texto.
Não tenho servidor X instalado nessa máquina.
Estou pesquisando há alguns dias e não consegui encontrar uma solução. Grato.
--
José de Figueiredo
Seja Livre, use GNU/Linux. Use Debian !!! ----------------------------------------------------------------
Antes de autorizar um aborto, pense que poderia ser vc lá dentro,
esperando alguém decidir se vc morre ou não... http://www.brasilsemaborto.com.br/ <http://www.brasilsemaborto.com.br/> ----------------------------------------------------------------
Venha estudar no IFSul - é público, federal e de qualidade.
Olá!
Não sei o que já tentou, mas há muito muito tempo atrás utilizei com sucesso o setterm.
Pesquisei para ver se tinha algo para Debian 10, achei um bem interessante para Ubuntu de 2019, provavelmente deve rolar bem no Debian
10 e com systemd para automatizar:
Blank screen after 1 min and turn it off after 2 min. Any keypress will
turn it back on. Make it auto-start after reboot.
The magic command what will do all the work:
|setterm --blank 1 --powerdown 2 |
If you get error: setterm: terminal xterm-256color does not support --blank
* You are probably trying this command by SSH. You must run it from
local of your machine, or do next stage of this guide.
------------------------------------------------------------------------
Make it auto-start
Insert command in executable file. Store it for example in hidden folder
of your home directory /home/USER/.boot-scripts/screen-off.sh
|#!/bin/bash setterm --blank 1 --powerdown 2 |
And make script file executable by systemctl. Create file /etc/systemd/system/screen-off.service
|[Unit] Description=Blank screen after 1 min and turn it off after 2
min. Any keypress will turn it back on. After=ssh.service [Service] Type=oneshot Environment=TERM=linux StandardOutput=tty
TTYPath=/dev/console ExecStart=/home/USER/.boot-scripts/screen-off.sh
[Install] WantedBy=local.target |
Make it executable:
|sudo chmod +x /home/USER/.boot-scripts/screen-off.sh sudo chmod +x /etc/systemd/system/screen-off.service |
And finally get it working and enabled on boot:
|sudo systemctl start screen-off.service sudo systemctl enable screen-off.service |
To disable it:
|sudo systemctl disable screen-off.service |
answered Dec 6 '19 at 14:11
<
https://askubuntu.com/users/1022682/marek-vach>
Marek Vach <
https://askubuntu.com/users/1022682/marek-vach>
--
[]'s
Junior Polegato
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Em 06/07/2021 23:51, José Figueiredo
escreveu:<br>
</div>
<blockquote type="cite" cite="mid:
CAM8ae5-yvjgTBf_Sx_12VtYGPs7q8cPNO-9BST2LBENUwe3y2A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_default" style="font-size:large">Pessoal, boa
noite. <br>
</div>
<div class="gmail_default" style="font-size:large">Fiz um
servidor, usando Debian 10 em um notebook antigo que tenho - a
instalação está ultra limpa - apenas a instalação do
netinstall com um acesso SSH. <br>
</div>
<div class="gmail_default" style="font-size:large">A dificuldade
está em que a tela fica 100% do tempo ligada, o que é inútil
pois faço todo acesso remotamente. Gostaria de dicas de como
desativar a tela - tipo descanso de tela em modo texto. <br>
</div>
<div class="gmail_default" style="font-size:large">Não tenho
servidor X instalado nessa máquina.</div>
<div class="gmail_default" style="font-size:large">
<div class="gmail_default" style="font-size:large">Estou
pesquisando há alguns dias e não consegui encontrar uma
solução. <br>
</div>
</div>
<div class="gmail_default" style="font-size:large">Grato.<br
clear="all">
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">José de Figueiredo<br>
Seja Livre, use GNU/Linux. Use Debian !!!<br> ----------------------------------------------------------------<br>
Antes de autorizar um aborto, pense que poderia ser vc lá
dentro,<br>
esperando alguém decidir se vc morre ou não...<br>
<a href="
http://www.brasilsemaborto.com.br/" target="_blank"
moz-do-not-send="true">
http://www.brasilsemaborto.com.br/</a><br> ----------------------------------------------------------------<br>
Venha estudar no IFSul - é público, federal e de qualidade.<br>
</div>
</div>
</div>
</blockquote>
<br>
Olá!<br>
<br>
Não sei o que já tentou, mas há muito muito tempo atrás
utilizei com sucesso o setterm.<br>
<br>
Pesquisei para ver se tinha algo para Debian 10, achei um
bem interessante para Ubuntu de 2019, provavelmente deve rolar bem
no Debian 10 e com systemd para automatizar:<br>
<br>
<div class="s-prose js-post-body" itemprop="text">
<p>Blank screen after 1 min and turn it off after 2 min. Any
keypress will turn it back on. Make it auto-start after reboot.</p>
<p>The magic command what will do all the work:</p>
<pre><code>setterm --blank 1 --powerdown 2
</code></pre>
<p>If you get error: setterm: terminal xterm-256color does not
support --blank</p>
<ul>
<li>You are probably trying this command by SSH. You must run it
from local of your machine, or do next stage of this guide.</li>
</ul>
<hr>
<h2>Make it auto-start</h2>
<p>Insert command in executable file. Store it for example in
hidden folder of your home directory
/home/USER/.boot-scripts/screen-off.sh</p>
<pre><code>#!/bin/bash
setterm --blank 1 --powerdown 2
</code></pre>
<p>And make script file executable by systemctl. Create file
/etc/systemd/system/screen-off.service</p>
<pre><code>[Unit]
Description=Blank screen after 1 min and turn it off after 2 min. Any keypress will turn it back on.
After=ssh.service
[Service]
Type=oneshot
Environment=TERM=linux
StandardOutput=tty
TTYPath=/dev/console
ExecStart=/home/USER/.boot-scripts/screen-off.sh
[Install]
WantedBy=local.target
</code></pre>
<p>Make it executable:</p>
<pre><code> sudo chmod +x /home/USER/.boot-scripts/screen-off.sh
sudo chmod +x /etc/systemd/system/screen-off.service
</code></pre>
<p>And finally get it working and enabled on boot:</p>
<pre><code>sudo systemctl start screen-off.service
sudo systemctl enable screen-off.service
</code></pre>
<p>To disable it:</p>
<pre><code>sudo systemctl disable screen-off.service
</code></pre>
</div>
<br>
<div class="user-action-time"> answered <span title="2019-12-06
14:11:21Z" class="relativetime">Dec 6 '19 at 14:11</span> </div>
<div class="user-gravatar32"> <a
href="
https://askubuntu.com/users/1022682/marek-vach">
<div class="gravatar-wrapper-32"><img src="
https://lh3.googleusercontent.com/-1xBF-6QehWQ/AAAAAAAAAAI/AAAAAAAAPTQ/3DZ7SpnkkDk/photo.jpg?sz=32"
alt="" class="bar-sm" width="32" height="32"></div>
</a> </div>
<a href="
https://askubuntu.com/users/1022682/marek-vach">Marek Vach</a><br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
[]'s
Junior Polegato
</pre>
</body>
</html>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)