How do I define new file types

James Richard Tyrer tyrerj at
Wed Nov 12 00:31:45 GMT 2003

Parzival wrote:
> I have files <basename>.icn, which are for the Unicon programming language.
> I have prepared Kate syntax highlighting definition, which among other things 
> specifies that the highlighting is to occur for mime type "text/x-unicon". 
> However I don't know any way to get KDE to create or recognize  such a mime 
> type.
> Similarly, I have a constuction tool SCons, like make, which uses
> textual specifications conventionally stored in files named "SConstruct".
> ("Sconstruct" is to SCons as "Makefile" is to make). 
> I would like to associate this file name with a new mime type, and then be 
> able to define a syntax highlighting specification for it as well as other 
> KDE type-dependent actions, which is chosen on the basis of the mime type.
> How can I do this?
> (I would just like to anticipate any objection that say, "text/x-unicon" is 
> not an "official" mime type: I have just checked the IANA mime type list, and 
> most of the mime-types associated with programming lanuage source code in 
> Kate highilghting system have mime types that are not on the IANA list.)

This should really be in the Fine Manual -- if it isn't then it is a bug in 
the manual.

You open the: "Settings" widget for Konqueror, choose the: "File 
Associations" section and click the: "Add" button.


This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list