1

I use my laptop to watch movies (crazy, I know), sometimes in a browser (Firefox) and sometimes in Totem. Either way, while I'm watching, the screen dims and eventually locks, per my Brightness and Lock settings.

I want that to happen basically any time that I'm not watching a movie, but I'd like it to stop happening while I watch movies.

Any suggestions?

Can I write a script to disable the screen lock for an hour or so? Is there a tool that does this?

Amanda
  • 9,333
  • If you're watching full screen movies, I just barely wrote an answer here http://askubuntu.com/a/778817/231142 – Terrance May 29 '16 at 03:17
  • 2
    I'm surprised no one has mentioned caffeine. https://launchpad.net/~caffeine-developers/+archive/ubuntu/ppa then sudo apt-get install caffeine Make sure you are in full-screen when watching movies, I'm not sure if the program can detect other events. So, as a bonus, full screen anything to prevent screen lock, though I haven't tested this. – ThisIsNotAnId Mar 15 '17 at 15:18

2 Answers2

0

Totem has a setting for that at least in 14.04 under
Edit->Preferences->Display. enter image description here

mikewhatever
  • 32,638
0

You can use the script below to assign keyboard shortcut to enable and disable. When you run it, it disables lock screen; if your run it again, it enables lock screen.

#!/bin/bash
status=`gsettings get org.gnome.desktop.screensaver lock-enabled`
if [ $status == 'true' ]
then 
    gsettings set org.gnome.desktop.screensaver lock-enabled false
    echo "Lock Screen Disabled!"
else 
    gsettings set org.gnome.desktop.screensaver lock-enabled true
    echo "Lock Screen Enabled!"
fi
anonymous2
  • 4,298
Bahram
  • 73
  • 1
  • 11