Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

[solved] how do i prevent screen from turning off


whiteghost

Question

hi all,

i use xfce.

i often use vlc to play media. i set option to disable screen saver while using vlc.

not sure how effective that is.

i recently tried 

$xset s off 

and thought it was helpin...

 

now i am watching netflix on google-chrome.... AND I REALLY WANT MY SCREEN TO STAY ON!

 

i had xscreensaver disabled, now unmerged it, no relief.

 

please help.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I use this:

$ cat screensaver_toggle

#!/bin/bash

#Mike Johnson
#toggle the screensaver on/off
#place icon in panel to indicate when off

DPMS=$(xset -q|grep "DPMS is"|cut -d " " -f5)
  	
	if [ $DPMS = "Enabled" ]; then
	lxpanelctl exit && lxpanel -p screensaver_off &
	xset -dpms
	xset s off
	S_STRING="         Screensaver Disabled"
	DISPLAY_COLOR="red"
    else
	lxpanelctl exit && lxpanel -p default &
	xset dpms
	xset s on
	S_STRING="         Screensaver Enabled"
	DISPLAY_COLOR="orange"
    fi
# Clean up any running aosd_cat processes
killall aosd_cat &> /dev/null
# Display the desired text
echo "$S_STRING" | aosd_cat -n "Georgia Italic 70" -u 1500 -o 300 -R $DISPLAY_COLOR -S black -f 300 -e 4 -p 3 -x 300

Along with a couple of other files, it places an icon in my panel I can click to return to screensaver enabled mode and prints large letters across the screen telling me the status using x11-libs/libaosd.  But you don't need all that foo-foo, the xset statements do it all.  The s directive turns on/off the screensaver (display of screen), the dpms (energy-star) turns the backlight on & off.  I have it tied to a hotkey so I can control it all with a keystroke.

The panel icon is a little more intricate, but if you want the large letters on the screen you just need to : USE="pango" emerge -av x11-libs/libaosd and use the above code (comment out the lxpanel lines).

Link to comment
Share on other sites

×
×
  • Create New...