ubuntu设置关闭屏幕和锁定
2016-07-20 08:51
302 查看
见链接: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 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:
To disable the screen lock:
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
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.
相关文章推荐
- 关于上一篇鼠标移到按钮时的“按下”效果的三种方法
- ubuntu用C++获取ip地址和mac地址
- [Cloud Computing]Mechanisms: Platform Trust Policy
- gitlab的搭建
- 100分程序员的8个习惯
- tr'y--catch/IO流/file/
- TCP/IP详解学习笔记(5)-IP选路,动态选路,和一些细节
- Xcode 关闭或打开子工程的调试
- linux笔记:linux常用命令-网络命令
- 判断层级代码
- javascript中数组和字符串的方法对比
- mpi学习日志(10):mpi4py实现简单并行矩阵乘法
- 【CF 698B】Fix a Tree(dfs)
- 基于时间轮的定时器设计
- Android开发优化之——使用软引用和弱引用
- Nginx 配置反向代理后,页面中取绝对URL地址的问题显示代理端口
- Leetcode 75. Sort Colors
- 2016年第12本:成功就靠专注一件事
- AndroidStudio生成全局变量的快捷键
- strspn()函数和strcspn()函数