Make Ubuntu 12.04 Show the Remaining Battery Life as a Percentage (tip)

By default, Ubuntu’s battery indicator does not show the remaining battery life as a percentage, instead it shows the remaining time. This I think is preferred by the most users, however, it would have been nice, if we could manually change between the two.

Then again, this indicator icon does show a small ‘bar’ that goes up/down, and you can get a rough idea about the remaining percentage. Plus, you can always access advanced statistics by using this icon and there it lists the current percentage as well. Still, it is a bit of a stretch.

Due to few issues that I’m having with my battery, I wanted the power indicator icon to display the percentage by default, so I looked for a solution. The best option was to use the famous ‘battery-status’ package. But sadly, it does not support Ubuntu 12.04.

But thanks to a simple hack done by ‘Leonardo Bras‘, you can easily make that happen in Ubuntu 12.04 too.

Battery-indicator-in-Ubuntu-12.04-displaying-the-precentage

Please remember that, it will only show the percentage and does not show the remaining time (if the developer could add an option to let users switch between the two, then that would be very useful!).

If interested, you can install this hack by using the below commands.

sudo apt-add-repository ppa:leonardobsp/indicator-upower-percentage

sudo apt-get update

sudo apt-get install indicator-power

Then logout of the Unity desktop and log back in to apply the changes. That’s it!.

How to remove it?

If you wanted to roll back the changes and get the original ‘indicator-power’ package, then use the below commands.

sudo apt-add-repository -r ppa:leonardobsp/indicator-upower-percentage

sudo apt-get update

sudo apt-get purge indicator-power

sudo apt-get install indicator-power

Again, logout and re-login to apply the changes.

That’s it. Good luck.

An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

16 thoughts on “Make Ubuntu 12.04 Show the Remaining Battery Life as a Percentage (tip)”

  1. This is great, thanks! 🙂 So handy! Cuz the time seems to be changing constantly, whereas the percentage gives a more accurate picture on how the battery is doing.

    Cheers!

    Reply
  2. Me too! Installed successfully on Ubuntu 13.04. Thanks a bunch, Leonardo and Gayan!

    Strange that the Ubuntu developers think that a computer can predict how you’ll be using your computer better than you can — this is ridiculous.

    Time left means nothing — percentage gives you a good idea that your laptop will not survive the upcoming meeting if you’ll be showing your clients a video presentation.

    Reply
  3. Will this work in Ubuntu 12.04 with XFCE 4.10 ???
    I’ve installed it but it doesn’t shows anything in indicator-panel.
    But in Ubuntu with Unity works flawlessly.

    🙂 thanks

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.