TranslateProject/translated/share/20141119 Qshutdown--An avanced shutdown tool.md

48 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Qshutdown 一个高级关机神器
================================================================================
qshutdown是一个QT程序用于让计算机在指定时间或者在几分钟后关机/重启/挂起/睡眠。它会一直显示时间直到相应的请求被发送到Gnome或KDE会话管理器或者发送到HAL或DeviceKit。而如果这一切都没有发生将会使用sudo shutdown -P now进行关机。对于那些只在特定时间使用计算机工作的人而言可能很有用。
qshutdown将在最后70秒时显示3次警告提醒。如果设置了1分钟或者本地时间+1它只会显示一次。
该程序使用qdbus来发送关机/重启/挂起/睡眠请求到gnome或kde会话管理器或者到HAL或DeviceKit而如果这些都没有工作那么就会使用sudo shutdown命令进行关机注意但发送请求到HAL或DeviceKit或者使用shutdown命令时会话不会被保存。如果使用shutdown命令该程序只会被关机或重启。所以如果在shutdown或reboot时间到时什么都没发生这就意味着用户缺少使用shutdown命令的权限。
在这种情况下,你可以进行以下操作:
粘贴以下信息到终端“EDITOR:nano sudo -E visudo”并添加此行“* ALL = NOPASSWD:/sbin/shutdown”这里*替换username或%groupname。
配置文件qshutdown.conf
倒计时最大计数为1440分钟24小时。配置文件和日志文件位于~/.qshutdown。
对于管理员:
在将qshutdonw.conf中的Lock_all选项设置为true后用户将不能修改设置。如果你使用“sudo chown root -R ~/.qshutdown”和“sudo chmod 744 ~/.qshutdown/qshutdown.conf”命令修改qshutdown.conf的权限后用户将不能修改配置文件。
### Ubuntu中安装Qshutdown ###
打开终端,然后运行以下命令
sudo apt-get install qshutdown
### 屏幕截图 ###
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/12.png)
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/23.png)
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/31.png)
![](http://www.ubuntugeek.com/wp-content/uploads/2014/11/41.png)
--------------------------------------------------------------------------------
via: http://www.ubuntugeek.com/qshutdown-an-avanced-shutdown-tool.html
作者:[ruchi][a]
译者:[GOLinux](https://github.com/GOLinux)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
[a]:http://www.ubuntugeek.com/author/ubuntufix