Kubuntu: how to fix pixellated app icons in Discover

Do your app icons in Discover look ugly and pixellated? If so, you’re probably a Kubuntu user. Every user of a recent Kubuntu version unfortunately sees horrid low-resolution icons in Discover. It’s very unpleasant.

Today I helped drive an investigation and resolution for this issue. Here’s the good news: it’ll be fixed in the upcoming Kubuntu 18.04, and you can fix it for yourself, today! Here’s how.

  • Run the following terminal commands:
    sudo sed -i "s/hidpi/large/" /etc/apt/apt.conf.d/60plasma-discover
    sudo apt update
    sudo appstreamcli refresh-cache --force
  • Restart Discover, if it’s running

Ta-daa! Pretty, high-resolution icons:

This turned out to be a bug in how Discover was packaged in Debian. Ubuntu was re-using the Debian Appstream configuration packaging, and that packaging was erroneously downloading HiDPi versions of small icons instead of large icons. This illustrates an eternal principle in software: the price of 3rd-party and upstream dependencies is eternal communication. When every layer of software is built on top of another layer provided by someone else, communication is mandatory; when the people responsible for each layer don’t talk to one another regularly, bugs creep in. Once all parties were talking to one another in the same (virtual) room, a fix materialized literally within minutes.

Thankfully, this bug has been squashed, and Kubuntu users will once again see pretty app icons.

If my efforts seem useful and you’d like to see more of them, consider becoming a patron on Patreon, LiberaPay, or PayPal.

Advertisements

22 thoughts on “Kubuntu: how to fix pixellated app icons in Discover

    1. Please note, I also get a ‘cgcicon invalid backend themes’ pop up when I open Discover. This was happening before I ran your fix here though – I think. Perhaps after installing flatpaks.
      I re-installed Discover via Synaptic and ran the above fix again. Icons are still pixillated.

      Like

  1. In Kubuntu 16.04

    anarcho@kubuntu:~$ sudo sed s/hidpi/large/ /etc/apt/apt.conf.d/60plasma-discover
    [sudo] password for anarcho:
    sed: can’t read /etc/apt/apt.conf.d/60plasma-discover: No such file or directory

    Like

    1. Hmm, maybe the file wasn’t there in Kubuntu 16.04. What output does this command produce?

      grep -ri “:DEP-11-icons-” /etc/apt/apt.conf.d/

      Like

      1. anarcho@kubuntu:~$ grep -ri “:DEP-11-icons-” /etc/apt/apt.conf.d/
        anarcho@kubuntu:~$ sudo sed -i “s/hidpi/large/” /etc/apt/apt.conf.d/60plasma-discover
        [sudo] password for anarcho:
        sed: can’t read /etc/apt/apt.conf.d/60plasma-discover: No such file or directory
        anarcho@kubuntu:~$

        Like

  2. This didn’t work for me. The command `sudo sed s/hidpi/large/ /etc/apt/apt.conf.d/60plasma-discover` just puts the edited file contents on stdout instead of changing the file. So I edited the file manually followed by `sudo appstreamcli refresh-cache –force` but discover still shows pixelated icons. I am using kubuntu-backports ppa and the 60plasma-discover file looks like this:

    ## This file is provided by KDE Discover to enable the download of
    ## small-size icons as well as bigger high-res application icons by default.
    ##
    ## The small (64x64px) icons are required for Discover to work, while the
    ## HiDPI icons are required for it to look good.

    Acquire::IndexTargets {
    deb::DEP-11-icons {
    DefaultEnabled “true”;
    };
    };

    Acquire::IndexTargets {
    deb::DEP-11-icons-large {
    DefaultEnabled “true”;
    };
    };

    Like

  3. Doesn’t seem to have fixed it here as the icons still look low resolution and I’m getting this if run from Konsole:
    invalid kns backend! “/etc/xdg/servicemenu.knsrc” because: “Config group not found! Check your KNS3 installation.”
    invalid kns backend! “/etc/xdg/ksysguard.knsrc” because: “Config group not found! Check your KNS3 installation.”
    Discarding invalid backend “servicemenu.knsrc”
    Discarding invalid backend “ksysguard.knsrc”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    org.kde.knewstuff.core: “Error transferring https://kdenlive.org/data/mltprofilesources.xml – server replied: Not Found”
    kns error “/etc/xdg/kdenlive_projectprofiles.knsrc” “Loading of providers from file: https://kdenlive.org/data/mltprofilesources.xml failed”
    could not find “org.kde.kdenlive.desktop” “”
    could not find “org.kde.development” “”
    org.kde.knewstuff.core: Could not find category “KAddressbook Theme”
    invalid kns backend! “/etc/xdg/kaddressbook_themes.knsrc” because: “All categories are missing”
    Discarding invalid backend “kaddressbook_themes.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/kaddressbook_themes.knsrc” “Invalid Kaddressbook_themes backend, contact your distributor.”
    org.kde.knewstuff.core: Could not find category “Calligra Flow Stencil”
    invalid kns backend! “/etc/xdg/calligra_stencils.knsrc” because: “All categories are missing”
    Discarding invalid backend “calligra_stencils.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/calligra_stencils.knsrc” “Invalid Calligra_stencils backend, contact your distributor.”
    org.kde.knewstuff.core: Could not find category “Xfce Icon Theme”
    invalid kns backend! “/etc/xdg/cgcicon.knsrc” because: “All categories are missing”
    Discarding invalid backend “cgcicon.knsrc”
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    qrc:/qml/DiscoverDrawer.qml:145: TypeError: Cannot read property ‘name’ of null
    kns error “/etc/xdg/cgcicon.knsrc” “Invalid Icon Themes backend, contact your distributor.”

    Like

      1. I was getting the kns error messages as pop-ups at the bottom of Discover’s window, but they were disappearing so quickly which is why I tried from the terminal.

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s