Author Topic: [SOLVED] Fine level management of mime types  (Read 1486 times)

tedlane

  • Guest
[SOLVED] Fine level management of mime types
« on: August 12, 2011, 09:08:21 PM »
Morning all,

I seem to have created a small but annoying feature in my main box PCManFM.  Double clicking on many file types tries to open them in gimp.  In particular, broken links (of which I have more than quite a few due to some recent housekeeping on my file server).

[please hang on a minute, I just did something silly - be right back] (  :-[  )

I've tried installing and using assogiate to try and fix the system mime type, but it doesn't help as symbolic links aren't "associated" with anything.  So I suppose that my real problem is the PCManFM associations and there doesn't seem to be a way to un-associate a file type using Properties -> Open With -> Customise.

Does PCManFM have it's own mime type database somewhere?  

ted

:-[  :-[ :-[ Silly as in associating symbolic links with pcmanfm - creating a giant recursive loop and 100% cpu  :-[ :-[ :-[
« Last Edit: August 13, 2011, 05:47:12 PM by tedlane »

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Fine level management of mime types
« Reply #1 on: August 12, 2011, 11:05:42 PM »
Make a backup copy of /usr/share/applications/mimeinfo.cache. Then have a look at the copy or the original.

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

tedlane

  • Guest
Re: Fine level management of mime types
« Reply #2 on: August 12, 2011, 11:37:32 PM »
OK, tried that but they all seem OK:
Code: [Select]
[bb@townsend ~]$ cp /usr/share/applications/mimeinfo.cache mymimes
[bb@townsend ~]$  grep gimp mymimes
image/x-xcf=gimp.desktop
image/png=gimp.desktop;gpicview.desktop;
image/bmp=gimp.desktop;gpicview.desktop;
image/x-portable-anymap=gimp.desktop
image/x-icon=gimp.desktop
image/x-portable-bitmap=gimp.desktop;gpicview.desktop;
image/pcx=gimp.desktop
image/x-wmf=gimp.desktop
image/gif=gimp.desktop;gpicview.desktop;
image/x-compressed-xcf=gimp.desktop
image/x-sgi=gimp.desktop
image/x-xwindowdump=gimp.desktop
application/pdf=evince.desktop;gimp.desktop;
image/g3fax=gimp.desktop
image/x-portable-pixmap=gimp.desktop;gpicview.desktop;
image/x-tga=gimp.desktop;gpicview.desktop;
image/x-fits=gimp.desktop
image/x-portable-graymap=gimp.desktop
image/jpeg=gimp.desktop;gpicview.desktop;
image/x-xpixmap=gimp.desktop
image/x-psd=gimp.desktop
image/x-xbitmap=gimp.desktop
image/tiff=evince.desktop;gimp.desktop;gpicview.desktop;
image/svg+xml=gimp.desktop;gpicview.desktop;
image/x-psp=gimp.desktop
application/postscript=evince.desktop;gimp.desktop;
[bb@townsend ~]

It's something inside PCManFM itself.  I should also add that the problem only occurs on broken symbolic links.
ted

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Fine level management of mime types
« Reply #3 on: August 13, 2011, 12:58:11 AM »
Have you tried running BleachBit and cleaning up those broken symlinks?
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Fine level management of mime types
« Reply #4 on: August 13, 2011, 01:21:32 AM »
Tedlane,
Have a look at /usr/share/applications/defaults.list. This is where you will find the default applications used to open files. Also, look in ~/.local/share/applications/defaults.list for any modifications done for your user.

tedlane

  • Guest
Re: Fine level management of mime types
« Reply #5 on: August 13, 2011, 04:40:00 AM »
Neal,

[bb@townsend ~]$ less ~.local/share/applications/defaults.list    =>   no such file

[bb@townsend ~]$ less /usr/share/applications/defaults.list   =>   I can't see anything in there untoward.
The only oddity is

[bb@townsend ~]$ grep inode less /usr/share/applications/defaults.list
Code: [Select]
inode/directory=nautilus-folder-handler.desktop
Still looking for where pcmanfm hides it's associations.  ???


djohnston,
I am about to try this good suggestion.  The only hesitation is that I don't want to delete them "on mass" without finding out what they are.  But, ???where??? in bleachbit is the option to do this?

ted


[mod] no less in the grep.  Should've copy/pasted.   >:(
« Last Edit: August 13, 2011, 05:05:17 AM by tedlane »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Fine level management of mime types
« Reply #6 on: August 13, 2011, 05:16:38 AM »
Neal,

[bb@townsend ~]$ less ~.local/share/applications/defaults.list    =>   no such file


Try -->  less ~/.local/share/applications/defaults.list
The slash (/) is part of the address.   
If the file doesn't exist, you can create it.   

Quote
[bb@townsend ~]$ less /usr/share/applications/defaults.list   =>   I can't see anything in there untoward.
The only oddity is

[bb@townsend ~]$ grep inode less /usr/share/applications/defaults.list
Code: [Select]
inode/directory=nautilus-folder-handler.desktop

Try a simpler method. Open it with leafpad and use its search function to see what is associated with gimp (or whatever).

Quote
Still looking for where pcmanfm hides it's associations.  ???

If you see nothing wrong in /usr/share/applications/defaults.list, you can copy it to ~/.local/share/applications/defaults.list.

defaults.list = file associations   

tedlane

  • Guest
Re: Fine level management of mime types
« Reply #7 on: August 13, 2011, 05:39:15 AM »
Quote
Try -->  less ~/.local/share/applications/defaults.list
The slash (/) is part of the address.   
If the file doesn't exist, you can create it.   


Yes, my bad retyping, the file did not exist.

Quote
Try a simpler method. Open it with leafpad and use its search function to see what is associated with gimp (or whatever).


Done.  There are only 4 and they are all image/x-.. mimes.
Code: [Select]
image/x-compressed-xcf=gimp.desktop
image/x-fits=gimp.desktop
image/x-psd=gimp.desktop
image/x-xcf=gimp.desktop

Quote
If you see nothing wrong in /usr/share/applications/defaults.list, you can copy it to ~/.local/share/applications/defaults.list.

Tried this.  No joy.  pcmanfm still "insists" that they are gimp files.

I did just notice this.  They (the broken links) do show up in pcmanfm as "Symbolic link" instead of the target file type.  You can see this in the following image - every "symbolic link" is a broken link.  (Sigh! If only pcmanfm had link management.)  You can also see the mime type associations in the drop down.

This is what is driving me bananas.  I just want to get rid of the association that pcmanfm has with the darn things! 

Wait! I've got another dopey idea.  I'll try associating them with a totally non-existent application in the Custom Command Line tab...  I'll report back momentarily.
ted


tedlane

  • Guest
Re: Fine level management of mime types
« Reply #8 on: August 13, 2011, 05:46:06 AM »





Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Fine level management of mime types
« Reply #9 on: August 13, 2011, 05:53:02 AM »
Ted,
You seem to be making things harder than they need to be. If the broken links are needed links, edit them to fix the links - or delete them and then create the needed link. If they are not needed, just delete them.
Logout/login.


tedlane

  • Guest
Re: Fine level management of mime types
« Reply #10 on: August 13, 2011, 06:02:59 AM »
Neal,

Thanks for bearing* with me on this.  What I haven't told is that the real problem I'm having is that the links are to a whole ream of gambas libraries that live on my file server and ...
1) during the originally mentioned "clean up" I moved/rationalized a few gazillion of them into a more structured directory layout.  This resulted in the miriad of broken links.
2) what I'm really trying to do is to avoid deleting everything that "looks" like a broken link in case they are not.

I suppose you're right.  I'll just go through them one by one and reset them using a terminal.

Thanks anyway for the time spent.  I'll just put it down as one of the few limitations of pcmanfm.

ted

[mod] * that was unintentional.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Fine level management of mime types
« Reply #11 on: August 13, 2011, 07:12:35 AM »
Neal,

Thanks for bearing* with me on this.  What I haven't told is that the real problem I'm having is that the links are to a whole ream of gambas libraries that live on my file server and ...
1) during the originally mentioned "clean up" I moved/rationalized a few gazillion of them into a more structured directory layout.  This resulted in the miriad of broken links.
2) what I'm really trying to do is to avoid deleting everything that "looks" like a broken link in case they are not.

I suppose you're right.  I'll just go through them one by one and reset them using a terminal.

Thanks anyway for the time spent.  I'll just put it down as one of the few limitations of pcmanfm.

ted

[mod] * that was unintentional.

Withholding information doesn't help, Ted.

You changed the ditectory structure and expected PCManFM to "automatically adjust" itself, the filesystem, symlinks and file associations? :o ??? :o

tedlane

  • Guest
Re: Fine level management of mime types
« Reply #12 on: August 13, 2011, 07:39:26 AM »
Neal,

No, no, no! I'm not saying or expecting that at all!

I realize what I did. In fact, I knew it was going to happen.
All I want to do is fix the association that pcmanfm has to broken links.  In fact I think that the association has nothing to do with the re-org per-se.

Maybe I'm not being clear enough???

1) The situation is that I have a large number of broken links.
2) The problem is that pcmanfm has an association, somehow, somewhere, between broken links and gimp and gedit and gpicview and leafpad in that order.
3) My difficulty is that I can't tell, just by looking at the files in pcmanfm, whether the link is broken or not.

But anyway, as I said, you (and I) have spent enough time as it is.  It's bed time here in Aus and tomorrow I'll get up, have some strong coffee and just go through them one by one in a terminal session and fix or delete them manually.  


thanks anyway

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Fine level management of mime types
« Reply #13 on: August 13, 2011, 08:08:24 AM »
After fixing the links, reboot. File associations should be normal after that.   

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Fine level management of mime types
« Reply #14 on: August 13, 2011, 09:44:53 AM »
tedlane,

Neal's the LXDE expert. I'm just answering your earlier question. Sorry, the broken symlinks option is in fslint, not bleachbit.


djohnston,
I am about to try this good suggestion.  The only hesitation is that I don't want to delete them "on mass" without finding out what they are.  But, ???where??? in bleachbit is the option to do this?




Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378