How to associate one MIME type with multiple file types?

How to associate one MIME type with multiple file types?

Post by Joe Smit » Sat, 24 Apr 1999 04:00:00



I want to set up kfm associations (icons & applications) for Applix files.

All the various Applix (wp, spreadsheet, graphics, etc) files are
handled by one 'application', which looks at the file type and decides
what part of the suite should open the document:

 applix wp-doc.aw       # opens in Applix Words
 applix ss-doc.as       # opens in Applix Spreadsheet
 ...

So, I want one MIME type 'application/x-applix', handled by one
application, but multiple icons according to the file suffix.

I use kfm (as non-root user) to set this up:
  Edit/New/Application: Execute 'applix', MIME type 'application/x-applix'
  Edit/New/MIME Type: Pattern: '*.aw', MIME type 'application/x-applix'
  Edit/New/MIME Type: Pattern: '*.as', MIME type 'application/x-applix'
but only one is recognized.  E.g., I can get all Applix word documents
(*.aw) associated, but the other Applix file types are still 'Text
editor' files.  If I play around, moving the MIME type .kdelnk's, or
so, I can get a different type associated, but still only one.

Can a MIME type only have one icon/pattern to identify it?  If so,
why?  This seems like a not-unusual situation.

<Joe
--
 Joe Smith

 811 Stellar-Chance/Cardiology                (215) 573-3067
 Philadelphia, PA 19104                       (215) 573-2094 (fax)

 
 
 

How to associate one MIME type with multiple file types?

Post by Joe Smit » Sat, 24 Apr 1999 04:00:00


Ok, I see now if I make MIME types for each type of file, everything
works.

Now can anyone tell me why there cannot be multiple file types that
map to one MIME type?  Or even better, tell me how to do it?

<Joe
--
 Joe Smith

 811 Stellar-Chance/Cardiology                (215) 573-3067
 Philadelphia, PA 19104                       (215) 573-2094 (fax)

 
 
 

How to associate one MIME type with multiple file types?

Post by Scott Abbot » Sat, 24 Apr 1999 04:00:00


If I understand you correctly, there can be more than one file type as
in file extensions.  I have WordPerfect setup to open *.wpd and *.doc
files just by having both *.wpd and *.doc in the Pattern textbox of my
application/x-wordperfect mime type.

I don't use Applix so I don't if this will allow you to launch the
correct app.  You may have to create an x-applix-word and an
x-applix-spreadsheet mime type to make it work correctly.  

 Scott


> Ok, I see now if I make MIME types for each type of file, everything
> works.

> Now can anyone tell me why there cannot be multiple file types that
> map to one MIME type?  Or even better, tell me how to do it?

> <Joe
> --
>  Joe Smith

>  811 Stellar-Chance/Cardiology                (215) 573-3067
>  Philadelphia, PA 19104                       (215) 573-2094 (fax)