How to Check If Linux Console Screensaver Has Blanked Screen

How to check if Linux console screensaver has blanked screen

You can parse the output of xset q with DISPLAY set, but it's not pretty.

$ xset q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Compose: off 04: Kana: off 05: Sleep: off
06: Suspend: off 07: Mute: off 08: Misc: off
09: Mail: off 10: Charging: off 11: Shift Lock: off
12: Group 2: off 13: Mouse Keys: off
auto repeat delay: 250 repeat rate: 30
auto repeating keys: 00ffffffdffffbbf
fadfffefffedffff
9fffffffffffffff
fff7ffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 20/10 threshold: 4
Screen Saver:
prefer blanking: yes allow exposures: yes
timeout: 0 cycle: 600
Colors:
default colormap: 0x20 BlackPixel: 0 WhitePixel: 16777215
Font Path:
/usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1,/usr/share/fonts/misc/,/usr/share/fonts/TTF/,/usr/share/fonts/Type1/,/usr/share/fonts/100dpi/,/usr/share/fonts/75dpi/,built-ins
DPMS (Energy Star):
Standby: 1200 Suspend: 1800 Off: 0
DPMS is Enabled
Monitor is On
Font cache:
Server does not have the FontCache Extension

How to have window's batch file detect when the screensaver is on?

The name of the screensaver process will vary by which screensaver is running, but it should always end in .scr.

tasklist | find ".scr" >nul
if %errorlevel% EQU 0 (
echo Screensaver is running
) else (
echo Screensaver is not running
)

The default Windows 10 screensavers have the following process names:

3D Text - ssText3d.scr
Blank - scrnsave.scr
Bubbles - Bubbles.scr
Mystify - Mystify.scr
Photos - PhotoScreensaver.scr
Ribbons - Ribbons.scr

When the computer is locked, the process LogonUI.exe runs.

tasklist | find "LogonUI.exe"
if %errorlevel% EQU 0 (
echo Computer is locked
) else (
echo Computer is unlocked
)

How do I disable the GNOME desktop screen lock?

The screen saver can also lock the screen. Uncheck either 'Activate screensaver when computer is idle' or 'Lock screen when screensaver is active' or both in screensaver preferences. From commandline use gnome-screensaver-preferences or goto 'System->Preferences->Screensaver'.

I think the corresponding keys (for use with gconftool-2) are /apps/gnome-screensaver/idle_activation_enabled and /apps/gnome-screensaver/lock_enabled.

HTH



Related Topics



Leave a reply



Submit