You are not logged in.

#1 2012-04-18 21:37:53

shaurz
Member
Registered: 2004-02-02
Posts: 358

[SOLVED] Icon for .desktop files works fine for all sizes except 32x32

I am trying to create a .desktop file for my application. I have installed all the icons in to the /usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/ directories, but for some reason the when the icon size in KDE is 32x32, the .desktop file shows a white sheet of paper with a question mark. For all other sizes the .desktop file uses the correct icon. The icon sizes I have installed are: 16, 24, 32, 48, 64, 128 and 256.

Any idea how this could happen? I have double-checked that the right icon is installed for 32x32. I have tried re-saving the icon in GIMP in case it was somehow corrupted.

Last edited by shaurz (2012-04-19 00:49:09)

Offline

#2 2012-04-18 21:40:20

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

@shaurz: The output of "file /usr/share/icons/hicolor/32x32/apps/the_icon.png"?

Last edited by lunar (2012-04-18 21:40:31)

Offline

#3 2012-04-18 21:42:43

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

/usr/share/icons/hicolor/32x32/apps/devo.png: PNG image data, 32 x 32, 8-bit/color RGBA, non-interlaced

Offline

#4 2012-04-18 21:43:19

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

Did you run "kbuildsyscoca4" after installation?

Offline

#5 2012-04-18 21:44:41

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

No, but I just tried that now and it made no difference.

Offline

#6 2012-04-18 21:59:42

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

Hmm, something very strange. If I only install the 256 icon, the same thing happens. All other icons sizes work (automatically generated from 256x256 icon) except 32x32... how odd.

Offline

#7 2012-04-18 22:01:47

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

If I change the name of the icon to something other than "devo", it works fine! I wonder if it's conflicting with something else?

Offline

#8 2012-04-18 22:47:01

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

@shaurz: Maybe the previously broken icon made it into the KDE pixmap cache.  Log out of KDE, clear the cache, and login again. The pixmap cache is located in "/var/tmp/kdecache-*/kpc" or "~/.kde4/cache-*/kpc" depending on your KDE version.  Replace the asterisk with your username.

Offline

#9 2012-04-19 00:48:46

shaurz
Member
Registered: 2004-02-02
Posts: 358

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

You were right, it turned out to be a bad icon cache. I didn't find any files called kpc, but I deleted all the *.kcache files and that did the trick. Thanks!

Offline

#10 2012-04-19 07:25:27

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: [SOLVED] Icon for .desktop files works fine for all sizes except 32x32

@shaurz: I didn't actuallly know the location of the cache, googled for it, and apparently only found outdated information.  Sorry hmm

Last edited by lunar (2012-04-19 07:25:52)

Offline

Board footer

Powered by FluxBB