File association, how?


A2000

Member
Joined
Apr 16, 2012
Messages
289
I can't find anything about file association in the boards or the wiki. I think I have seen one such article a while back. Maybe because it was named otherwise. What I mean is:


How can I define which program starts if I open a file in thunar? I read something about mime and mailcap but there isn't a mailcap file in /etc and yet the file association for pdfs is correct. Can anybody give me a hint where to look?
 
Look inside:


/usr/share/applications/


And the "master file":


/usr/share/applications/defaults.list
 
Look inside:


/usr/share/applications/


And the "master file":


/usr/share/applications/defaults.list

Hmm, are you sure that the location is right. I can only see 491 files named *.desktop and no defaults.list. Just searched with find (how I miss the manpages) in /usr but found no defaults.list.
 
Seems it's /etc/xdg/op/applications/defaults.list for Zaxxon.


Check also in your ~.config/
 
That looks promising, as in defaults.list it reads


application/vnd.ms-excel=gnumeric.desktop


and


/etc/mime.types lists


application/vnd.ms-excel xls xlb xlt


but no program is invoked if I doubleclick *.xls files. Maybe application/x-excel xls is missing in /etc/mime.types.
 
Last edited by a moderator:
For this to work, gnumeric must be installed in the system, not as a .pnd.


I never had to use /etc/mime* for making associations with thunar.


Try first to do simple things with shipped applications, ie open pdf with evince.
 
Ah, that makes sense. Unfortunatly it's exactly what I'm missing: pdf and awb (Abiword) do work well. I just wanted to open the files which are not common in Linux like the aforementioned xls. But I see the problem. So there has to be a script in the nand which will mount the PND and run the program with the file as an argument?
 
Back
Top