My screenlock is set to five minutes. So while playing YouTube videos after five minutes the screen locks even though the video is playing. Any solutions?
|
|
In my system (Ubuntu 11.10) i use Caffeine. You can try if it works in Xubuntu too. It adds a notification area icon where you can enable/disable screensaver for some programs. To install Caffeine, do the following:
Then execute in a terminal:
You can then choose the programs that should disable the screensaver:
Hope it helps. |
|||||||
|
|
There is a nice little script on GitHub called lightsOn which should do the trick you want. Basically it looks for full screen video (flash in firefox or chromium, mplayer or vlc) and if so disable xscreensaver and also the auto power-manager dim screen capability. from the script itself: HOW TO USE: Start the script with the number of seconds you want the checks for fullscreen to be done. Example: "./lightsOn.sh 120 &" will Check every 120 seconds if Mplayer, VLC, Firefox or Chromium are fullscreen and delay screensaver and Power Management if so. You want the number of seconds to be ~10 seconds less than the time it takes your screensaver or Power Management to activate. If you don't pass an argument, the checks are done every 50 seconds. Thus call the script from your autostart folder as per my answer here. Adjust the script for whether you are running flash/vlc/mplayer remember to give the script execute rights to run i.e.
|
|||
|
|
|
You should not only check the screensaver options, but also the power management options, especially the "Put display to sleep when inactive for ..." option. Note that on laptops, there are two settings with that name: when the laptop is running on AC power and when it is running on battery. |
|||
|
|
|
The VLC in this PPA in addition to being a current version of VLC also correctly implements screen saver inhibition. https://launchpad.net/~n-muench/+archive/vlc?field.series_filter=lucid You can add this PPA using this command
|
|||
|
|
|
I've never tried it, but this might work: http://www.upubuntu.com/2011/07/disable-temporarily-ubuntu-screensaver.html |
|||||
|
|
It depends somewhat on what version of Ubuntu you are using. In 11.10, you can find "System Settings" in by clicking the gear icon in the top right corner of the screen. Select this, and in the dialog that pops up, select "Screen". You can set the amount of time that your computer will be idle before the screen blanks with the dropdown menu, or disable that feature by clicking the button labeled "Lock". -screenshot not posted due to lack of reputation- If you have an older system, you may have to look elsewhere for this setting, but it is there somewhere. |
|||||
|
|
For those that like full or manual control at their hands This command line can set the screensaver delay time: Use "0" (zero) to keep it on or another value to define the delay in seconds. The following script will keep the screen on until some key is pressed.
#!/bin/bash
#
# To turn screen sleep time off for a while then back on
#
# by desgua 2013/01/27
#
# Getting the previous configuration
back=$(gsettings get org.gnome.settings-daemon.plugins.power sleep-display-ac)
# Defining the restore function
function RESTORE {
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac $back
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery $back
gsettings set org.gnome.desktop.session idle-delay $back
bmin=$(echo "$back / 60" | bc)
#notify-send "Screen sleep time restored to $bmin minutes."
echo
echo "Screen sleep time restored to $bmin minutes."
echo
exit 0
}
# Making sure the user don't mess up...
trap 'RESTORE && exit 0' INT HUP
# Disabling sleep time
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-battery 0
gsettings set org.gnome.desktop.session idle-delay 0
echo
echo "Screen sleep time turned off."
echo
#notify-send "Screen sleep time turned off."
# Waiting for user to press some key and then restore the previous configuration
read -n 1 -p 'Press any key to turn it on again. ' b
RESTORE
exit 0
How to run a script: Enjoy ;-) |
||||
|
|
