Translations of this page:

When I'm in Full Desktop mode, some times the power button stops working.

The power button is linked to a script in /etc/acpi called powerbtn.sh, which is run as the default Xandros user. powerbtn.sh calls dcop to send a signal to all open applications to get ready to close.

When your run any root-level KDE applications, (such as the root File Browser), this session is owned by the root user and as such the power button script silently fails because it doesn't have permission to read root's .ICEauthority file.

Fascinating, so what can I do about it?

There are a few possible work-arounds – you can either delete the root user .ICEauthority file (manually or via the powerbtn script), change the powerbtn script to run dcop as root, or only send a dcop signal to user-level sessions. I went with the last option, as it works and was the first thing I tried. Which method is actually preferable is left as an exercise for the reader.

Option #1 - Modify DCOP

Using a text editor such as vi, open the file /etc/acpi/powerbtn.sh and look for the following line (around line number 8):

dcop –all-sessions –all-users ksmserver ksmserver logout 1 2 2 && exit 0

and change it to

dcop –all-sessions –user user ksmserver ksmserver logout 1 2 2 && exit 0

and save the file. Voila, power button is back!

Option #2 - Add a SUDO to DCOP

As above, open /etc/acpi/powerbtn.sh and look for the line that executes dcop

dcop –all-sessions –all-users ksmserver ksmserver logout 1 2 2 && exit 0

and add the “sudo” command in front of it so that the line looks like this:

sudo dcop –all-sessions –all-users ksmserver ksmserver logout 1 2 2 && exit 0

This will cause dcop to run with root privileges, which will prevent any errors. Its less editing, but of course now you're running dcop as root and some users may prefer not to do this.

Option #3 - Delete root's .ICEauthority file

If you don't feel comfortable editing any system-level scripts, you can work-around the problem by getting rid of the .ICEauthority file that causes the powerbtn.sh script to break.

Simply open up a terminal window and type:

sudo rm /root/.ICEauthority

This file will be re-created each time you run a root-level KDE application, so you'll have to do this every time the power button stops working.

 
bugfixes/fixpowerbutton.txt · Last modified: 2007/12/19 19:40 by vectrex
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
This website is no longer under a Creative Commons license.
All rights are reserved by Eeeuser.com and each individual author
If you want to reproduce content, all individual contributers must be identified and you must seek permission from Eeeuser.com