Detecting intervals of inactivity in the tty? (to simulate setterm --blank in fbterm)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












setterm --blank n allows me to configure the virtual terminal to automatically shut the display off after n minutes of inactivity. Unfortunately, I spend all my time in fbterm, where setterm does not apply.



I've found that I can manually shut the display off with



$ sudo sh -c 'echo 1 > /sys/devices/pci0000:00/0000:00:10.0/0000:02:00.0/graphics/fb0/blank'


(and echo 0 to restore it).



Is there any way to detect periods of inactivity in the tty/fbterm, so that I can create a script to simulate a setterm --blank setting?







share|improve this question






















  • setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
    – Ipor Sircer
    Oct 27 '17 at 17:35











  • Thanks! I've updated the question to reflect this understanding.
    – Ryan Lue
    Oct 27 '17 at 17:41














up vote
3
down vote

favorite












setterm --blank n allows me to configure the virtual terminal to automatically shut the display off after n minutes of inactivity. Unfortunately, I spend all my time in fbterm, where setterm does not apply.



I've found that I can manually shut the display off with



$ sudo sh -c 'echo 1 > /sys/devices/pci0000:00/0000:00:10.0/0000:02:00.0/graphics/fb0/blank'


(and echo 0 to restore it).



Is there any way to detect periods of inactivity in the tty/fbterm, so that I can create a script to simulate a setterm --blank setting?







share|improve this question






















  • setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
    – Ipor Sircer
    Oct 27 '17 at 17:35











  • Thanks! I've updated the question to reflect this understanding.
    – Ryan Lue
    Oct 27 '17 at 17:41












up vote
3
down vote

favorite









up vote
3
down vote

favorite











setterm --blank n allows me to configure the virtual terminal to automatically shut the display off after n minutes of inactivity. Unfortunately, I spend all my time in fbterm, where setterm does not apply.



I've found that I can manually shut the display off with



$ sudo sh -c 'echo 1 > /sys/devices/pci0000:00/0000:00:10.0/0000:02:00.0/graphics/fb0/blank'


(and echo 0 to restore it).



Is there any way to detect periods of inactivity in the tty/fbterm, so that I can create a script to simulate a setterm --blank setting?







share|improve this question














setterm --blank n allows me to configure the virtual terminal to automatically shut the display off after n minutes of inactivity. Unfortunately, I spend all my time in fbterm, where setterm does not apply.



I've found that I can manually shut the display off with



$ sudo sh -c 'echo 1 > /sys/devices/pci0000:00/0000:00:10.0/0000:02:00.0/graphics/fb0/blank'


(and echo 0 to restore it).



Is there any way to detect periods of inactivity in the tty/fbterm, so that I can create a script to simulate a setterm --blank setting?









share|improve this question













share|improve this question




share|improve this question








edited Oct 27 '17 at 17:41

























asked Oct 27 '17 at 17:31









Ryan Lue

1997




1997











  • setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
    – Ipor Sircer
    Oct 27 '17 at 17:35











  • Thanks! I've updated the question to reflect this understanding.
    – Ryan Lue
    Oct 27 '17 at 17:41
















  • setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
    – Ipor Sircer
    Oct 27 '17 at 17:35











  • Thanks! I've updated the question to reflect this understanding.
    – Ryan Lue
    Oct 27 '17 at 17:41















setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
– Ipor Sircer
Oct 27 '17 at 17:35





setterm command only work in /dev/tty* consoles, not from terminal emulators or terminal multiplexers.
– Ipor Sircer
Oct 27 '17 at 17:35













Thanks! I've updated the question to reflect this understanding.
– Ryan Lue
Oct 27 '17 at 17:41




Thanks! I've updated the question to reflect this understanding.
– Ryan Lue
Oct 27 '17 at 17:41















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f400930%2fdetecting-intervals-of-inactivity-in-the-tty-to-simulate-setterm-blank-in-fb%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f400930%2fdetecting-intervals-of-inactivity-in-the-tty-to-simulate-setterm-blank-in-fb%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?