Manual Screensaver in console no X

Moderator: Forum moderators

Post Reply
watchdog
Posts: 85
Joined: Fri Dec 13, 2019 4:32 pm
Has thanked: 15 times
Been thanked: 12 times

Manual Screensaver in console no X

Post 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.

watchdog
Posts: 85
Joined: Fri Dec 13, 2019 4:32 pm
Has thanked: 15 times
Been thanked: 12 times

Re: Manual Screensaver in console no X

Post 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
Post Reply

Return to “Utility”