Fixing Faenza theme battery icons for Ubuntu 12.10 Quantal Quetzal

[Edit: There’s been an update to the Faenza theme in the PPA (version 1.3 now) – install it first, log out and back in before seeing if you really need to do this.]

I’ve been using the Faenza theme for years on both my computers, using the ~tiheum ppa to install it automatically. I feel that the subtle squareness suits the unity bar really well. So I upgraded to the latest Ubuntu (12.10, codenamed Quantal Quetzal. I know, I know…) and found a problem. The battery icon was ugly when charging, but fine when not plugged in. Pedant and perfectionist that I am, I had to fix it – and if you have the same problem, make it easy for you to do the same.

The problem is not that the Faenza theme doesn’t have the right icons – it does, but they’re not getting selected because of a change in the way app indicators look for the right icon. They now look first for icons with the sufix “-symbolic” and for some reason don’t find the icons that have always worked for Faenza. So it’s a simple as creating the right sym-links to make it all work.

The script does the same thing for two folders, Faenza and Faenza-Dark, going to the subfolder /status/24 and creating a bunch of links to the icons that are already there so that the indicator-power finds them when the power state changes.

To run the script, in case you’re not sure, download it and open up the Terminal. Make sure you know what folder it’s saved in (for me, it’s Downloads) and type cd Downloads Then type sudo ./fix_faenza.sh (Thanks to commenter Lithium753 who reminded me to add this in!) That should do it, though you may need to either log out and back in, or change icon themes to something else and back to Faenza to see the difference. Also, try unplugging and re-connecting the power supply before asking for help in the comments. If you do need help, please let me know what output the script gave, copy and paste from the terminal.

Hope it’s helpful to someone! Please leave a comment if you try it, especially if you have a problem or if it doesn’t fix it for you.

Download the script to fix Faenza battery icons

  • Maycon Ghizzi

    thanks, solve my problem!

  • Thanks, now my Unity desktop looks perfect.

  • jonrogersuk

    Thanks for the comments, it’s really encouraging!

  • Lithium753

    I tried running the script in terminal and retarting the machine and it didnt work. Did I do something wrong?

  • jonrogersuk

    Try running it again. What output do you get? Also, try selecting a different icon theme (I use ubuntu tweak) and then switching back to Faenza.

  • jonrogersuk

    You’re right, you have to run the script in the terminal using sudo – I’ll change the main blog post to reflect that.

  • B1-66ERDK

    Great work it’s perfect 🙂

  • Gil

    Thanks a lot, Jon, been looking for a hack for this nuisance since I upgraded to 12.10. However, me being the pedant and perfectionist that I am (wink, wink), I found out that when I click on the newly updated charging battery icon, I still get the old fugly icon on the pull down menu with the information of the time left to charge. Any idea how to fix that?

  • jonrogersuk

    I think (bit I’m not certain and I haven’t tested this) that you could do it by modifying my script to do the same thing in the ‘scalable’ sub folder instead of ’24’. Let me know if it helps!

  • Gil

    Just gave it a try (substituting ’24’ by ‘scalable’ on your script and running it as is):

    Fixing battery icons for Faenza
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    Fixing battery icons for Faenza-Dark
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory
    ln: accessing `gpm-battery-100-charging.png’: No such file or directory

  • jonrogersuk

    Yeah, I should have looked before replying, not guessed. I was partly right about the scalable bit, but I still can’t get my head around which icon power-indicator is selecting and why when you are using a power supply rather than a battery. It is selecting a scalable icon instead of a 22px icon, which it should be and I really can’t figure out why. The names in the scalable folder are a bit different, but I’m still not happy with it selecting a scalable icon instead of the correct size. I’m still looking into it, I’ll get back to you.

  • jonrogersuk

    OK, so this is weird. I wrote a second script that swapped the ‘fugly icon’ in scalable for a nicer scalable icon with a link (it’s here: https://dl.dropbox.com/u/5999036/fix_faenza2.sh) I wasn’t happy with the fix, so to revert the change, I re-installed faenza theme with Synaptic (though any other apt manager will do). Now I can’t reproduce the problem, even though I could before. Try it, see what happens, no guarantees, though I can’t work on it any more!

  • jonrogersuk

    Probably because there’s an update available for Faenza – go get it now from the PPA and stop messing about with my scripts!

  • Gil

    That’s what I did this morning: the problem still persisted even with the latest PPA update, then I found your blog. Anyhow, the good news is that your script finally solved it (it was lacking a ‘done’ statement at the end though), so now everything works like a charm!
    My guess is that your post is still going to get you some traffic these next few days, so thanks again for your contribution 🙂

  • jonrogersuk

    Glad it worked, I’ve updated the script with the missing ‘done’, too.

  • flip

    :* thx

  • ti_dji

    Thanks, it works fine for me too !!

  • Simone Bottino

    I did a version for Faenza-Ambiance, it use .svg instead of .png 😉
    http://ubuntuone.com/36IPil6tCXW8t2bwLZINpd

  • jonrogersuk

    Thanks for sharing that. Faenza-Ambiance ought to work with the one I created because it inherits from Faenza, but if this works for people it’s great!

  • Albert

    Thank you! You saved me an hour or even more time 🙂

  • I’ve been searching for this for two hours… Thanks!

  • Works like a charm. Thank you sir!

  • Jan Schürmann

    works!!! THANK YOU SOO MUCH! this was annoying because my eyes were always looking to that ugly icon 😉 only thing, to make it “perfect” is, that the icon showing if the indicator is clicked is still the “ugly” one…no big problem but…

  • rpgmaker

    Thanks Simone, I use faenza ambiance so it was good to have this script ready-made.

    I stumbled upon this without looking for it, but those battery icons were very ugly, I just disabled the battery icon altogether just to stop looking at it. You’re a good man Jon Rogers, a very good man.

  • Thank you so much! I am also a pedant and perfectionist 😀

  • Nicklasos

    Can you do that with guake terminal icon, please? 🙂

  • Nicklasos

    Ok, just need to copy icons from /usr/share/icons/faenza to /use/share/pixmap/guake

  • Alone

    Thanks a lot! Also working in 13.04!

  • xiaoxie

    Thank you very much!

  • Pingback: Changing desktop again: Mint 14 spiced with Unity()

  • Pingback: Fixing Faenza theme battery icons()

  • Pingback: Changing desktop again: Mint 14 spiced with Unity()

  • Danny Corpod

    Just awesome topic! You touched on a topical issue. I would appreciate if you’d written about how to fill a form online. I’ve found PDFfiller – online service for forms filling. It’s pretty easy to use and pretty cheap. You can find fillable NY DTF ST-124 here http://goo.gl/qpVsBw