"Icon theme has no cache file"

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
lingben
Level 2
Level 2
Posts: 98
Joined: Fri Dec 02, 2011 3:33 pm

"Icon theme has no cache file"

Post by lingben »

Just installed Menda circle icon theme and in the appearance menu there is now an exclamation mark:

http://imgur.com/SMdS5Ac

hovering over it shows a tooltip with the following message:
Warning: this icon theme has no cache file. You can create this by running gtk-update-icon-cache /home/NAME/.icons/Menda-Circle/ in a terminal emulator.
so I followed the directions and entered the command in terminal and got this in response:

gtk-update-icon-cache: Failed to open file /home/NAME/.icons/Menda-Circle/.icon-theme.cache : File exists

No idea what this means or how to proceed.
Thank you.

EDIT: after some more searching around, found this thread from way back in 2008:
https://bbs.archlinux.org/viewtopic.php?id=58108

Here's the solution that worked for that person, but not sure if it applies to me or how to go about doing it:
Apparently gtk-update-icon-cache didn't accept that i had a .icon-theme.cache in /usr/share/icons/hicolor/. After removing it gtk-update-icon-cache apparently created a new file "icon-theme.cache" and doesn't complain anymore. The thing that is wierd about this is that on my other comp i have the .icon-theme.cache and it doesn't complain when upgrading.. Marking this solved anyway
lingben
Level 2
Level 2
Posts: 98
Joined: Fri Dec 02, 2011 3:33 pm

Re: "Icon theme has no cache file"

Post by lingben »

I removed the file with the rm command followed by the location of the cache file. I then redid the command

Code: Select all

gtk-update-icon-cache... 
which resulted in the error message: "The generated cache was invalid"

More searching as I try to solve this and found someone with the same issue who has solved it:

http://forums.linuxmint.com/viewtopic.p ... 0&t=163281

however, no idea what the solution actually means!
Though looking at that pull request, I think you can simply repeat it and rename the mentioned files as described there.
You're a lifesaver! :) I went to apps/scalable/ and did mv cairo-dock\ -o.svg cairo-dock-o.svg && mv cairo-dock\ -c.svg cairo-dock-c.svg
Now gtk-update-icon-cache reports successful creation of the cache file.
Thanks.
Any help appreciated.

Thanks
lingben
Level 2
Level 2
Posts: 98
Joined: Fri Dec 02, 2011 3:33 pm

Re: "Icon theme has no cache file"

Post by lingben »

Hi, sorry to bump this but can anyone help? I know this isn't a huge issue but more of an annoyance but my interest is really just to learn. thanks.

mods: if this is against the forum rules, please remove (sorry)
TCCTech
Level 1
Level 1
Posts: 2
Joined: Tue Jul 26, 2016 6:42 pm

Re: "Icon theme has no cache file"

Post by TCCTech »

Hi Lingben,

Did you ever get an answer to your question?

in the solution you showed that you did not understand, the reason there was an issue was that in two of the FILES names in the ICON pack had a space in the name so that would cause gtk-update-icon-cache to exit with an error. So the solution was to rename the files and remove the space.


"You're a lifesaver! :) I went to apps/scalable/ and did mv cairo-dock\ -o.svg cairo-dock-o.svg && mv cairo-dock\ -c.svg cairo-dock-c.svg
Now gtk-update-icon-cache reports successful creation of the cache file.
Thanks."

He did not expand on what he did so the solution if he wrote it properly would of been:

navigate to /usr/share/icons/mint-x/scalable/apps/

move, copy or rename the file with the space in it to a new name without any spaces

mv cairo-dock\ -o.svg cairo-dock-o.svg end result = cairo-dock-o.svg no spaces

notice the space between the "\" and "-o" that is what was causing the issue in his case

&& <this symbol stands for do the next command only if this one succeeds, it is a way of doing more then one command on a line>

mv cairo-dock\ -c.svg cairo-dock-c.svg

so the correct command would be as follows:

navigiate to the directory where the file exists with the spaces in it, in this case:

cd /usr/share/icons/mint-x/scalable/apps/

sudo mv cairo-dock\ -o.svg cairo-dock-o.svg && mv cairo-dock\ -c.svg cairo-dock-c.svg


Hope it helps you or someone with the problem.


Official Newb in the Linux World :)

TCCTech
TCCTech
Level 1
Level 1
Posts: 2
Joined: Tue Jul 26, 2016 6:42 pm

Re: "Icon theme has no cache file"

Post by TCCTech »

To Whomever it may help:

I am running Linux Mint 17.3

I had multiple icons packs saying there was no icon cache file

I tried many times to recreate the icon cache with the many solutions that are out there, none of them worked for me.

So I was looking into the the issue and I noticed that the cache file was named:

.icon-theme.cache which with the period at the beginning makes it a hidden file

so I opened the folder as root and renamed the file by right clicking on the file and selecting "rename" from :

.icon-theme.cache to icon-theme.cache (just removed the period making it no longer hidden)

I then closed my system preferences windows and reopened it, went back into "Appearance" then selected "Icons" and it was no longer complaining about a missing cache file.

So not sure if this is a fix or a work around or what but it worked for me. I am just not sure how to check if it is using the CACHE file or not.



TCCTech
User avatar
deanr72
Level 3
Level 3
Posts: 163
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: "Icon theme has no cache file"

Post by deanr72 »

TCCTech wrote:
Tue Jul 26, 2016 8:04 pm
To Whomever it may help:

I am running Linux Mint 17.3

I had multiple icons packs saying there was no icon cache file

I tried many times to recreate the icon cache with the many solutions that are out there, none of them worked for me.

So I was looking into the the issue and I noticed that the cache file was named:

.icon-theme.cache which with the period at the beginning makes it a hidden file

so I opened the folder as root and renamed the file by right clicking on the file and selecting "rename" from :

.icon-theme.cache to icon-theme.cache (just removed the period making it no longer hidden)

I then closed my system preferences windows and reopened it, went back into "Appearance" then selected "Icons" and it was no longer complaining about a missing cache file.

So not sure if this is a fix or a work around or what but it worked for me. I am just not sure how to check if it is using the CACHE file or not.



TCCTech
That's one of the great benefits of Mint being so popular for so long. You can find an answer to an annoying issue even though the thread hasn't seen any activity for 3 years :lol:
Post Reply

Return to “Newbie Questions”