[ale] xfce4-power-manager works only as root

Ted W. ted at techmachine.net
Wed Aug 24 01:12:07 EDT 2011


On 08/23/2011 04:11 PM, David A. De Graaf wrote:
> On Tue, Aug 23, 2011 at 12:12:30AM -0400, Ted W. wrote:
>> Hello from someone new to ALE, (really enjoyed the Drupal presentation)
>>
>> I'll try to make this brief. I have installed Slackware 13.37 on an old
>> IBM laptop (new to me). I've installed Fluxbox as the window manager and
>> am attempting to use the xfce4-power-manager to try and manage the
>> battery consumption a bit. The trouble is that the drop-down menus to
>> change the options for things such as the lid button action and critical
>> battery action are grayed out unless I run the application as root.
>> Based on my searches I've determined it's likely an issue with policy
>> kit or maybe hal but I'm unfamiliar with where to go from there. Any
>> solutions or ideas to get me going in the right direction would be
>> greatly appreciated.
>
> I struggled with getting Fedora 15 and xfce4 to work properly, and
> after many days of Googling came upon an obscure solution.
> Add this line to your ~/.xinitrc file:
>    ck-launch-session dbus-launch --sh-syntax --exit-with-session startxfce4
> and then use startx instead of startxfce4 to initiate X.
>
> I don't understand how or why this works.  The need to do it is
> clearly a bug (BZ 722703).
>
> This has a side benefit of somehow persuading that massive pile of poo
> called  "pam"  that I should actually be allowed to edit my NetworkManager
> connections and to edit my PowerManager settings.
>
> It also magically restores the Hibernate and Suspend 'buttons' to the
> PowerManager applet, and restores the Shutdown, Suspend, and Hibernate
> buttons to the Logout icon, all of which were either absent or greyed out.
>
> It also restores the proper definition of the DISPLAY variable in root
> windows, allowing gui config programs (system-config-*) to work.
>
>
> One other thing.  Once you have the Suspend button restored, you'll
> probably want to have suspend actually work.  On my Asus N10 netbook,
> pm-suspend started properly, but ended with a hung netbook, with the
> CAPSLOCK LED flashing.  Only a power-cycle would recover it.
>
> This was eventually traced to presence of VirtualBox-4.1.
> Upon downgrading to VirtualBox-4.0, suspend is working correctly.
>
David, thanks for the reply.

I attempted to add:
	exec ck-launch-session dbus-launch --sh-syntax --exit-with-session 
startfluxbox (as well as startxfce4)
and still did not have any luck. I found reference to a similar issue on 
the gentoo message boards here 
<http://forums.gentoo.org/viewtopic-t-836949-highlight-.html> which 
leads me to believe that console kit is still the culprit here. I'm just 
not familiar enough with it or dbus to really know what I'm looking at.

As far as I can tell I have consolekit running, hald running and 
dbus-daemon running (disabling any one of these three produces some 
interesting errors on X start up). I've tried moving my user in and out 
of a few groups to see if that would help narrow it down but it didn't 
have any affect on the issue.

I'm not sure if there would be anything useful in the following output, 
but this is what I get when I run "xfce4-power-manager --no-daemon"
================================================================================
(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: CPU FREQ 
interface cannot be used
(xfce4-power-manager:3924): xfce4-power-manager-DEBUG: Size Changed 200 
icon=xfpm-primary-charged

(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: could not 
map keysym 1008ffa8 to keycode


(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: 
GetBrightness failed


(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: Error 
getting brightness level: Rejected send message, 1 matched rules; 
type="method_call", sender=":1.41" (uid=1000 pid=3924 
comm="xfce4-power-manager) 
interface="org.freedesktop.Hal.Device.LaptopPanel" 
member="GetBrightness" error name="(unset)" requested_reply=0 
destination="org.freedesktop.Hal" (uid=0 pid=2670 comm="/usr/sbin/hald))


(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: 
GetBrightness failed


(xfce4-power-manager:3924): xfce4-power-manager-WARNING **: Error 
getting brightness level: Rejected send message, 1 matched rules; 
type="method_call", sender=":1.41" (uid=1000 pid=3924 
comm="xfce4-power-manager) 
interface="org.freedesktop.Hal.Device.LaptopPanel" 
member="GetBrightness" error name="(unset)" requested_reply=0 
destination="org.freedesktop.Hal" (uid=0 pid=2670 comm="/usr/sbin/hald))

(xfce4-power-manager:3924): xfce4-power-manager-DEBUG: Size Changed 16 
icon=xfpm-primary-charged
================================================================================
-- 
Ted W. < Ted at Techmachine.net >
Registered GNU/Linux user #413569


More information about the Ale mailing list