Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-12-27 22:47:59

StyxD
Member
Registered: 2011-12-27
Posts: 3

[Solved] Where does Thunar cache mime info?

Some time ago I customized some icons associated with mimetypes using a program named assogiate. It's been since deprecated in my distro, so I can't use it anymore, and my custom icons started disappearing gradually.

I would like to wipe the remaining ones clean and start setting them anew manually, but I just can't find where Thunar stil keeps the junk associations. They're not in ~/.local/share/mime and the problem doesn't affect other file managers, so it must be Thunar/xfce thing. Removing ~/.cache/Thunar doesn't help.

Offline

#2 2011-12-28 11:49:46

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Where does Thunar cache mime info?

Probably in ~/.local/share/applications

Offline

#3 2011-12-28 14:32:01

StyxD
Member
Registered: 2011-12-27
Posts: 3

Re: [Solved] Where does Thunar cache mime info?

Yes, there is a mimeinfo.cache file, but it appears to contain associations of mimetype to application that's run when you double-click a file of that type.

Maybe I should have clarified it in the thread title: I want to find where Thunar keeps mimetype to icon associations.

Offline

#4 2012-01-01 10:16:29

aga
Member
Registered: 2011-12-30
Posts: 17

Re: [Solved] Where does Thunar cache mime info?

Customizing Thunar
thunar.xfce.org/documentation/C/customizing-thunar.html

I'm not sure it (thunar) does manage a "cache" of mimetype associations.
From what's stated in the wiki, sounds like thunar performs a lookup by referring to some externally maintained "xdg config" file.

If a thunar config file exists, I would expect a copy of it is pathed within each user's home

~/.local/share/Thunar/
or
~/.cache/Thunar/

Offline

#5 2012-01-02 02:56:33

samuvuo
Member
From: Finland
Registered: 2011-12-28
Posts: 3

Re: [Solved] Where does Thunar cache mime info?

I took a quick look in /usr/share/mime and didn't find settings for icons. I'm guessing it's just as simple as changing the icons in
/usr/share/icons/themename/mimetypes/.

Upgrading a package will most likely overwrite the customized icons, if you are using some common icon theme like Tango. My solution to this has been to clone the icon theme I'm using to a new theme (/usr/share/icons/mytheme) and in its index.theme set it to inherit the common icon theme (ie. gnome-colors-common).

I'm sure there are other ways and most likely a better, more "correct" way of doing this, but I haven't had time to investigate.


Thinkpad R61 | Arch Linux x86_64 | SLiM + Xfce 4.10 + conky

Offline

#6 2012-01-02 07:23:36

jeromeg
Member
From: France
Registered: 2010-11-11
Posts: 131
Website

Re: [Solved] Where does Thunar cache mime info?

I did some research for you on Assogiate, it stores its changes in:

~/.local/share/mime/packages/Override.xml
/usr/local/share/mime/packages/Override.xml

You can tweak this file by hand to control the icons for mime-types, the specification for this file is explained in a lot of articles (Google !) such as http://www.packtpub.com/article/control … -in-ubuntu.

Cheers

Offline

#7 2012-01-12 19:04:19

StyxD
Member
Registered: 2011-12-27
Posts: 3

Re: [Solved] Where does Thunar cache mime info?

No, it's not Override.xml. This file contains my custom mimetypes I defined using Assogiate, but no icon information.

Anyway, I solved it. And now I don't know if I was being too stupid, or Thunar too smart.

Thunar doesn't cache icon associations anywhere, it's just set to always try to use icons from ~/.local/share/icons/hicolor first, instead of those defined by theme (if it's controlled by some "xdg config" file, I wasn't able to find it in strace output - but I wasn't really looking very hard).

When I was using Assogiate to mix and match icons from various themes, it was dropping symlinks in the aforementioned directory. Then, after the system upgrade which also deprecated Assogiate, some of those themes were not installed, rendering those symlinks dead, which is when I noticed some of the icons went missing.

It seems that all that's needed for manual customization is to put the desired icon into hicolor directory with the right name. Quite handy.

What prompted me to think that the problem is with Thunar's cache is that neither PCMan File Manager, nor xfce4-desktop (which is, kinda like, your own component) does that, instead they stick to the selected theme.

And that's about it. I feel a little silly now.

Offline

Board footer

Powered by FluxBB