Last active
April 13, 2024 21:09
-
-
Save dublado/269f45a09667dcd4b0eddafdb96d6010 to your computer and use it in GitHub Desktop.
How can I tell Ubuntu to do nothing when I close my laptop lid?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -H gedit /etc/systemd/logind.conf | |
sudo restart systemd-logind | |
sudo service systemd-logind restart | |
or | |
IgnoreLid=true in /etc/UPower/UPower.conf | |
service upower restart | |
or | |
1.When on AC Power, do nothing when laptop lid is closed: | |
gconftool-2 -t string -s /apps/gnome-power-manager/buttons/lid_ac nothing | |
2.When on Battery Power, do nothing when laptop lid is closed: | |
gconftool-2 -t string -s /apps/gnome-power-manager/buttons/lid_battery nothing | |
http://askubuntu.com/questions/15520/how-can-i-tell-ubuntu-to-do-nothing-when-i-close-my-laptop-lid | |
=== | |
all versions | |
#!/bin/bash | |
# PLEASE FEEL FREE TO CHANGE THE SCRIPT | |
# Ubuntu 16.04 [PLEASE COMPLETE] | |
sed -i '/HandleLidSwitch/d' /etc/systemd/logind.conf >/dev/null 1&>2 | |
echo 'HandleLidSwitch=nothing' >> /etc/systemd/logind.conf >/dev/null 1&>2 | |
# Ubuntu 14.04 [PLEASE COMPLETE] | |
sed -i '/IgnoreLid/d' /etc/UPower/UPower.conf >/dev/null 1&>2 | |
echo 'IgnoreLid=true'>> /etc/UPower/UPower.conf | |
# [PLEASE COMPLETE ] | |
# gconftool-2 -t string -s /apps/gnome-power-manager/buttons/lid_ac [PLEASE COMPLETE ] | |
# gconftool-2 -t string -s /apps/gnome-power-manager/buttons/lid_battery nothing [PLEASE COMPLETE ] | |
# RESTART SERVICES | |
service upower restart | |
service systemd-logind restart | |
# disable dim screen | |
gsettings get org.gnome.settings-daemon.plugins.power idle-dim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment