2014-11-27

在 Ubuntu Mate 14.04 中 disable suspend

有些桌上型電腦可能一 suspend 就給它一覺不醒,為了怕使用者誤按了這個功能不妨在桌上型電腦上將這個功能關掉。

做法其實很簡單的。

為了操作方便,不妨先進入到 root 權限:

$ sudo su

然後進入到 /etc/polkit-1/localauthority/50-local.d 這個目錄:

# cd /etc/polkit-1/localauthority/50-local.d

使用文書編輯器(在 Ubuntu Mate 中是 pluma),產生下列檔案:

# pluma com.ubuntu.disable-suspend.pkla

在這個檔案中加入以下內容:

[Disable suspend (upower)]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no
ResultInactive=no
ResultAny=no

[Disable suspend (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=no
ResultInactive=no
ResultAny=no

[Disable suspend when others are logged in (logind)]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no
ResultInactive=no
ResultAny=no

----

以後,就不會出現 suspend 這個功能了,如下圖:



沒有留言 :

張貼留言