設置Centos 8在筆記本電腦蓋上時的處理

  1. Open the /etc/systemd/logind.conf file for editing.

  2. Find the HandleLidSwitch=suspend line in the file. If it is quoted out with the # character at the start, unquote it.

    If the line is not present in the file, add it.

  3. Replace the default suspend parameter with

    • lock for the screen to lock;

    • ignore for nothing to happen;

    • poweroff for the computer to switch off.

    For example:

    HandleLidSwitch=lock
    HandleLidSwitchExternalPower=lock
    
     
  4. Save your changes and close the editor.

  5. Run the following command so that your changes preserve the next restart of the system:

    # systemctl restart systemd-logind.service

---END--- 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章