12

elementary locks the screen after about 15 minutes of "inactivity", except the activity I'm doing is watching videos (no keyboard or mouse inputs during that lapse).

Site in question is Crunchyroll (uses flash plugin) running on Chromium in fullscreen mode on a secondary display (a 720p TV) via HDMI. AdBlock activated.

Behavior: right in the middle of an episode (12 to 15 minutes) the TV screen suddenly goes No Input. Main display (laptop screen) shows Login screen. Upon entering my password, video resumes.

My workaround to this is that I randomly move the mouse from time to time.

Should I do anything special to prevent screen/session locking?

8

lightsOn

There is a litte bash script called lightsOn on GitHub, which automatically checks on various apps, including fullscreen Flash and html5 video. (It works for me.)

Bash script managing screensaver and display power management (DPMS) on different conditions (fullscreen videos, specific applications, specific outputs).

To use the program save the file lightsOn.sh in your home directory, make it executable by typing chmod +x ~/lightsOn.sh and run it ~/lightsOn.sh 300 (this will check every 300 seconds = 5 minutes).

If it works you can add the script to startup by adding ~/lightsOn.sh 300 in System Settings > Applications > Startup.


The script detects a variety of apps / usages, you can configure (among other options) detecting certain things right in the shell script:

# Modify these variables if you want this script to detect if MPV, Mplayer,
# VLC, Minitube, Totem or a web browser Flash/HTML5 Video.
mplayer_detection=1
mpv_detection=1
vlc_detection=1
totem_detection=1
firefox_flash_detection=1
firefox_html5_detection=1
chromium_flash_detection=1
chromium_html5_detection=1
chromium_pepper_flash_detection=1
chrome_pepper_flash_detection=1
chrome_html5_detection=1
opera_flash_detection=1
opera_html5_detection=1
yandexBrowser_html5_flash_detection=1
epiphany_html5_detection=1
webkit_flash_detection=1
minitube_detection=1
4

Try to use Caffeine.

A status bar application able to temporarily prevent the activation of both the screensaver and the "sleep" powersaving mode.

Install:

sudo add-apt-repository ppa:caffeine-developers/ppa 
sudo apt-get update
sudo apt-get install caffeine

EDIT: Currently, this method doesn't work on Freya.

  • Thank you @PNG I installed, but I don't know how to "manage" it. I mean, it's in my Applications menu, and when I click on its icon it seems like it starts, but I can't see whether it's running or not. How can I enable/disable it? – Jorge Jul 29 '15 at 22:27
  • @Jorge, it should work automatically, without user intervention. Simply place it in the autostart. – png2378 Jul 29 '15 at 22:34
  • @Jorge I experience a bug with this app where I can apparently open it but there's no icon in the Wingpanel for me to manage it (see: bugs.launchpad.net/elementaryos/+bug/1473096). A way around this is to launch caffeine-indicator instead from Slingshot, that should show you the icon in Wingpanel. PNG: that won't work, at least in my case I have to manually tell it to 'Activate' otherwise it does nothing. – Gabriel Jul 30 '15 at 14:25
  • Also @Jorge if you see that the bug I pointed you too is the same one that affects you, please mark yourself as accepted and change the status from 'New' to 'Confirmed'. Thanks! – Gabriel Jul 30 '15 at 14:26
  • 1
    Sorry, this is really some point stopped working. Installing Caffeine Plus also did not bring results. – png2378 Jul 30 '15 at 19:47
0

The following commands do the job of using lightsOn :

mkdir -p ~/scripts && cd ~/scripts
wget https://raw.github.com/hotice/lightsOn/master/lightsOn.sh
chmod +x lightsOn.sh

By default, the script works with Firefox and Chromium, but you can also enable it for VLC or mplayer. To do this, open the "lightsOn.sh" file and modify the "mplayer_detection" and/or "vlc_detection" from 0 to 1.

To run the script: Open terminal and run-

~/scripts/lightsOn.sh

To get the script to run each time your computer starts, you can add it to the startup applications.

Reference here

0

The best way I found it for every Linux system is:

  • Open VLC
  • Play and pause any video you have
  • Reduce to icon
  • Then you can view every streaming video without start the screensaver

This is the best way and more simple instead use some useless scripts.

This feature need to come with browsers and not with additional scripts/apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.