Burris, Gavin on 14 Dec 2018 08:56:41 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Configuring *buntu 18.10 laptop behavior when lid is closed and no one logged in


How about something like this?

Disable:
echo "HandleLidSwitch=ignore" |sudo tee -a /etc/systemd/logind.conf
sudo service systemd-logind restart

Enable:
sudo sed -i.bak 's/^\(HandleLidSwitch=\).*/\1suspend/' /etc/systemd/logind.conf
sudo service systemd-logind restart


On Fri 12/14/18 11:26AM EST, K.S. Bhaskar wrote:
> I have a laptop with *buntu 18.10 installed. I would like this laptop to
> not suspend when the lid is closed when on AC power and no one logged in
> (i.e., used as a server), and to suspend when the lid is closed when on
> battery power, and no one is logged in. While it's easy enough to configure
> this behavior when someone is logged in, I have not found a way to do this
> for the machine when no one is logged in. I looked at tlp, but it doesn't
> seem to have a way to specify this.
> 
> I'm OK with configuring to override a user setting when someone is logged
> in, as long as I can configure it this way when no one is logged in. Any
> pointers welcome. Thank you very much in advance.
> 
> Regards
> – Bhaskar

> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


-- 
Gavin W. Burris
Senior Project Leader for Research Computing
The Wharton School
University of Pennsylvania
Search our documentation: http://research-it.wharton.upenn.edu/about/
Subscribe to the Newsletter: http://whr.tn/ResearchNewsletterSubscribe
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug