indicator-power only shows its image if there are batteries available to avoid showing the battery-missing icon on systems without a battery. indicator-applet handles this situation by connecting to the show/hide signals of the indicator entry's image and label and then showing/hiding the indicator menuitem when a signal is received.
Also, indicator-power requires org.gnome.SettingsDaemon.Power to gather information on the devices, but it seems that gnome-settings-daemon needs to be started before the GetDevices call will succeed (it doesn't seem to load the power plugin until then, :0-greeter.log will contain:
Error getting devices: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface `org.gnome.SettingsDaemon.Power' on object at path /org/gnome/SettingsDaemon/Power
).
My first thought was to call org.gnome.SettingsDaemon.Start() in unity-greeter/src/user-list.vala:setup_indicators before loading any of the indicators. This seems to work, but it may better to handle it in indicator-power.
I think there are two issues here.
indicator-power only shows its image if there are batteries available to avoid showing the battery-missing icon on systems without a battery. indicator-applet handles this situation by connecting to the show/hide signals of the indicator entry's image and label and then showing/hiding the indicator menuitem when a signal is received.
Also, indicator-power requires org.gnome. SettingsDaemon. Power to gather information on the devices, but it seems that gnome-settings- daemon needs to be started before the GetDevices call will succeed (it doesn't seem to load the power plugin until then, :0-greeter.log will contain: org.freedesktop .DBus.Error. UnknownMethod: No such interface `org.gnome. SettingsDaemon. Power' on object at path /org/gnome/ SettingsDaemon/ Power
Error getting devices: GDBus.Error:
).
My first thought was to call org.gnome. SettingsDaemon. Start() in unity-greeter/ src/user- list.vala: setup_indicator s before loading any of the indicators. This seems to work, but it may better to handle it in indicator-power.