Ubuntu settings off screen and lock

Source: Internet
Author: User

See link: Http://askubuntu.com/questions/177348/how-do-i-disable-the-screensaver-lock

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

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), s o Create a function to restore normal behavior and use trap <function> 0 (for bash-type shells) to catch exits and apply the Restorati on functions.

Ubuntu settings off screen and lock

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.