View Full Version : [all variants] command to change action when lid is closed.
tuxonapogostick
November 4th, 2011, 05:19 PM
Hi all.
I would like to change the power management action from suspend to blank screen when laptop lid is closed. I am wondering if I can do this from command line. I did some search on ubuntu frums and google but have had no luck yet. Generally speaking my question is about how to do power management from command line.
Any help is appreciated.
Cheers.
duke.tim
November 4th, 2011, 07:24 PM
The default power config file is in
/etc/default/acpi-support
if you are going to be using the terminal you would use
vim filename
or
vi
pico
emacs
rather than the gui gedit
SteveDee
November 4th, 2011, 07:27 PM
Do you mean this: http://ubuntuforums.org/showthread.php?t=813387
tuxonapogostick
November 4th, 2011, 07:55 PM
I couldn't find in this file anything regarding laptop lid. What I am looking for is something like: command lidclosed action blankscreen. It would be nice If I knew what option/file gnome-power-pref gui is changing when I change laptop lid closed action from suspend to blank screen.
tuxonapogostick
November 4th, 2011, 08:16 PM
Thans for the link. It is definitely relavent, but it didn't help much.
matt_symes
November 4th, 2011, 08:28 PM
Hi
Hi all.
I would like to change the power management action from suspend to blank screen when laptop lid is closed. I am wondering if I can do this from command line. I did some search on ubuntu frums and google but have had no luck yet. Generally speaking my question is about how to do power management from command line.
Any help is appreciated.
Cheers.
Are you using gnome or Unity with gnome-power-manager ?
If so then
gconftool-2 -t string /apps/gnome-power-manager/buttons/lid_ac -s "blank"
gconftool-2 -t string /apps/gnome-power-manager/buttons/lid_battery -s "blank"The other options besides blank are suspend, hibernate and shutdown.
Kind regards
tuxonapogostick
November 5th, 2011, 03:36 AM
Hi
Are you using gnome or Unity with gnome-power-manager ?
If so then
gconftool-2 -t string /apps/gnome-power-manager/buttons/lid_ac -s "blank"
gconftool-2 -t string /apps/gnome-power-manager/buttons/lid_battery -s "blank"The other options besides blank are suspend, hibernate and shutdown.
Kind regards
Yes, I am using gnome-power-manager within unity. When I first tried it, it didn't work. Later, I tried it again and it worked like a charm. Thanks a lot for this.
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.