l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
July 21: Defensive computing: Information security for individuals
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2009 Aug 03 16:17

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Kubuntu (KDE4) and power button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Kubuntu (KDE4) and power button



On Mon, 2009-08-03 at 15:19 -0700, Bill Kendrick wrote:
> Ok, I have not figured out where, in KDE4, to tell my system to _NOT_
> "shut down immediately, no questions asked" when the power button is pushed.
> (Which my son loves to do, so he can see the big kubuntu logo during shutdown.)
> 
> When I click the batter icon in the Plasma taskbar, "Guidance Power Manager"
> comes up, but the closest thing I see is for "When Laptop Lid Closed", which
> is not it.  (It's set to 'Suspend', which works fine.)
> 
> 
> I tried hitting [Alt]+[F2] to bring up KRunner, and typed "power"...
> 
> The "Power Control" control module allows configuration for external displays;
> not what I'm looking for.
> 
> Under "Power Management" control module, there's an "Edit Profiles" section.
> Inside there, under 'Actions', there is a "When Power Button Pressed" setting.
> Under all 5 categories ("Aggressive Powersave", "Performance", etc.), I made
> sure it's set to "Do nothing."  However, hit the power button and Linux
> begins shutting down immediately.
> 
> Finally, there's "Power Management Backend" section in the "Hardware"
> control module.  The only option is "HAL-Power."
> 
> 
> See a script, 'powerbtn.sh', in my /etc/acpi/ directory.
> Just glancing at it, and not trying to invoke my limited knowledge of
> BASH syntax, it looks like it first tries to talk to GNOME, then KDE,
> then as a last resort, issues an '/sbin/shutdown -h now'.
> 
> I guess I should just blow away, chmod or modify that script, eh?
> Or is there something I can do to 'fix' it, so that when the power button is
> hit, KDE does the right thing?

One option: blow it away.

The other option: look in /etc/acpi/events for a bunch of files that
tell acpi which script to call when specific buttons are pressed, and
blow away whichever file has the line "event=button[ /]power". This
would have the effect that the script isn't called anymore.

> Since my laptop had Ubuntu factory-installed, and hence started life
> with GNOME, perhaps there's some GNOME setting that's getting picked
> up by the ACPI script first.  (i.e., I'm telling KDE "do nothing," but
> GNOME is telling it "shutdown", and it's NOT a matter of the ACPI script
> hitting its "if all else failed, just initiate a plain shutdown" logic.)

I doubt it. In Debian, at least, all of the acpi scripts are in
desktop-neutral packages related specifically to power management. Run
"dpkg -S /etc/acpi" and check whether there are any desktop-specific
packages on Ubuntu that touch this, but it's probably kept separate.

--Ken
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.