ubuntu , 笔记本合上盖子时不关机的方法。

实测ubuntu 14.04 好使

1) 编辑 /etc/systemd/logind.conf

2) 找到 HandleLidSwitch 设置,去掉行头注释#,然后改成下面这样

HandleLidSwitch=ignore

3) 重启systemd-logind

sudo restart systemd-logind

增加另外一种方法:

2nd Option: Run dconf-editor then go "org->gnome->settings-daemon->plugins->power". Here you should have the possibility to set various options(buttons actions,sleep,etc.). Among them you should have the'lid-close-battery-action' and'lid-close-ac-action settings'. If not move to 3 Optionotherwise adjust the settings as required.

原文地址:https://www.cnblogs.com/johnsonshu/p/5161553.html