Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I'm watching a film in Mythtv the screen turns to black every 10 - 15 mins and I have to log back into Ubuntu. Very annoying!

How do I disable the black screen / screensaver / logout in Unity?

There no longer seems to be any options to turn the screen saver off as there were in Ubuntu prior to Unity.

share|improve this question
Follow this instruction: How to Disable Screensaver/Lock Screen/Sleep Mode in Ubuntu? – user141261 Mar 18 '13 at 3:51
up vote 88 down vote accepted
  • Go to System Settings...Brightness and Lock:

    enter image description here

  • The default screensaver idle time is 10 minutes, and the screen is locked once the screensaver activates:

    enter image description here

  • You can adjust the idle time (or disable the screensaver), and also disable the lock:

    enter image description here

  • Simply close Brightness and Lock to apply the new settings.

share|improve this answer
This does not work. The X server has a separate setting that still causes the monitor to turn off after N minutes of inactivity. – Cerin May 2 '13 at 10:47
And how do you disable that setting? – matteo Oct 24 '13 at 18:18
And why on earth is this non-working answer marked as answer? – matteo Oct 24 '13 at 18:18
Well, it sort of works. You don't have to authenticate, but you still have to move the mouse or press a key to wake the screen back up. So I agree it's not a very good answer. – BobDoolittle Sep 16 '14 at 17:56
What I wonder is why this setting group is called "Brightness and Lock", when it has not much to do with brightness.. – Claudiu Oct 15 '14 at 17:41

If you want to wrap your app in a script that takes care of this for you when you launch it (or GUI simply isn't an option), the best command-line solution as of Ubuntu 14.04 is:

To disable the screen blackout:

gsettings set org.gnome.desktop.session idle-delay <seconds> (0 to disable)

To disable the screen lock:

gsettings set org.gnome.desktop.screensaver lock-enabled false

You probably want to add their inverses at the end of the wrapper script to return your system to normal behavior on exit. In such a case, you want to prevent against ungraceful termination (i.e. interrupt, or SIGTERM during system shutdown), so create a function to restore normal behavior and use trap <function> 0 (for bash-type shells) to catch exits and apply the restoration functions.

share|improve this answer
works on ubuntu 16.04 (with unity DE) – Felipe Almeida May 17 at 20:57

To disable the automatic screen lock in Ubuntu 14.10 Gnome, these are the necessary steps:

  1. Start the application "Settings"
  2. Choose "Privacy" under the "Personal" heading
  3. Choose "Screen Lock"
  4. Toggle "Automatic Screen Lock" from the default "ON" to "OFF"

To make this answer more useful as a Google search result for common search terms such as "disable lock screen ubuntu" (how I found this page), I added this answer to expand this page to include the steps to disable the automatic screen lock in Ubuntu 14.10 Gnome. System Settings (called simply "Settings" in Ubuntu 14.10 Gnome) are organized slightly differently within Ubuntu 14.10 Gnome than as described by the answer listed above.

share|improve this answer
Only answer works on Ubuntu 14.10 with Gnome 3. – Fernando Kosh Feb 12 '15 at 20:56
Vote this up! It is the only one that works on 16.04! – Theodore R. Smith Jun 27 at 18:14

If the unity gui doesn't work, then you could try using xset

Open a terminal and type:

xset s off

Also try some things here:

share|improve this answer

protected by Community Mar 18 '13 at 4:06

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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