Page 1 of 1

Manual Screensaver in console no X

Posted: Sun Jul 30, 2023 5:15 am
by watchdog

Install by Package Manager vbetool for your puppy. Edit with geany /root/.jwm/jwmrc-personal inserting the following two lines:

Code: Select all

<Key mask="C" key="F10">exec:screensaveron</Key>
<Key mask="C" key="F11">exec:screensaveroff</Key>

Put in /usr/bin the following two script screensaveron:

Code: Select all

#!/bin/sh
#xset dpms force off
#setterm -powersave on
vbetool dpms off

and scrensaveroff:

Code: Select all

#!/bin/sh
#xset dpms force on
#setterm -powersave off
#vbetool dpms off
vbetool dpms on

Give them execute permissions. Restart jwm. Now pushing Ctrl-F10 and Ctrl-F11 you can turn on and off the screen in any situation even in console noX.


Re: Manual Screensaver in console no X

Posted: Mon Jul 31, 2023 12:42 pm
by watchdog

I have found on the web a script which I modified to toggle the screen on and off with a combination of keys.

togglescreenvbe:

Code: Select all

# turn screens off/on
# (ɔ) alex cabal

screenOffLockFile=/tmp/screen-off-lock

if [ -f $screenOffLockFile ];
then
    rm $screenOffLockFile
else
    touch $screenOffLockFile
    sleep .5
    while [ -f  $screenOffLockFile ]
    do
         sleep 2 
        vbetool dpms off
#     xset dpms force off        
    done
#    xset dpms force on    
    vbetool dpms on
fi