• jcs@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 month ago

    Disable suspend when the laptop lid is closed:

    sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/logind.conf
    sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf
    sudo systemctl restart systemd-logind
    

    If you are in a TTY, you can blank the screen before closing the lid to prevent burn-in. After running this, come back later and press a key to turn the screen on again.

    alias blankscreen='setterm --blank=force; read ans; setterm --blank=poke'

    • MonkderVierte@lemmy.zip
      link
      fedilink
      arrow-up
      0
      arrow-down
      1
      ·
      edit-2
      1 month ago

      Thanks, but honestly, a simple cat <file> would be more helpful than a sed line. I mean, who reads sed lines?