On 2020-03-26 at 08:56:16 Cameron Simpson wrote: > On 26Mar2020 01:13, Tim <ignored_mailbox@xxxxxxxxxxxx> wrote: > >On Wed, 2020-03-25 at 13:47 +0100, Erik P. Olsen wrote: > >> there is nothing in BOIS settings regarding closing of the lid. > >> However, it's not terribly important, so I can live with it. > > > >Just be aware that if you close the lid (on *some* laptops) and leave > >them running, they can overheat. *They* rely on the lid being open for > >sufficient airflow. > > Aye. Particularly if you're running something CPU intensive as well. > > For this reason I keep a little shell script called "zz" around, to > sleep the laptop. So named to make it trivial to type and therefore easy > to prefer to just shutting the lid. Here: > > #!/bin/sh > # > # Sleep the machine. - Cameron Simpson <cs@xxxxxxxxxx> > > pf -d > sync > if [ "x$OS" = xdarwin ] > then > pmset sleepnow > else > set-x sudo hibernate \ > || { echo "Hibernate fails, exit status $?" >&2 > exit 1 > } > fi > > The "pf -d" just shuts down my active ssh port forwards (other script > automation there, ignore it). The if-statement is what you want. Hmm, it > could do with an: > > : ${OS:=`uname -s | tr '[A-Z]' '[a-z]'`} > > up the top, too. I set $OS in my environment anyway, which is why I > hadn't noticed. Thanks for the idea. I suppose I could just use systemctl suspend right away. -- Erik P. Olsen - Copenhagen, Denmark Fedora 31/64 bit Linux xfce Claws-Mail POP3 Gramps 5.1.2 Bacula 9.4.4 _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx