LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   I have failed to add a mime-type for sc files to .mailcap (http://www.linuxquestions.org/questions/linux-software-2/i-have-failed-to-add-a-mime-type-for-sc-files-to-mailcap-929339/)

RandomTroll 02-14-2012 02:50 PM

I have failed to add a mime-type for sc files to .mailcap
 
I want to add an entry to .mailcap to run my spreadsheet program, sc,
when it encounters a file with the .sc extension.

/etc/file/magic has an sc entry that includes:

!:mime application/x-sc

I put:

application/x-sc; /usr/bin/sc %s

in my .mailcap. /usr/share/mime has an entry for sc files.
/usr/bin/file identifies sc files correctly. I've read RFC 1254. No
error is reported. I've inserted lots of other file types into
.mailcap successfully: where have I gone wrong with sc?

It's in the detection: if I rewrite .mailcap to run sc on jpeg files
then mail tries to run sc on jpeg files

RandomTroll 02-19-2012 06:30 PM

Adding

application/x-sc sc

to $HOME/.mime.types solved this problem. .mime.types is an 'extension map'; some apps look for a global extension map.


All times are GMT -5. The time now is 11:41 AM.