setting the default file association for double clicks (gnome / nautilus)

David Holden dvdhldn at gmail.com
Wed Oct 11 11:24:08 UTC 2006


Thanks for all the replies everyone, I think that gnome would really
benefit from a tool to do this.

But looking from the various links you all given the following seems to
have worked, although I'm still a bit hazy on it.


I used the mime-editor application from here

http://rox.sourceforge.net/desktop/MIME-Editor

to add a mime type, in this case

application/iwl

This seems to create a file in ~/.local/share/mime/packages called
Override.xml

<?xml version="1.0" ?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-iwl">
        <comment>CIF move application</comment>
    <glob pattern="*.iwl"/></mime-type>
</mime-info>

after logging out and logging in again nautilus listed files with suffix
.iwl differently but when I clicked on them they changed to type text/plain
and double clicking caused a warning to appear saying the file contents
indicated its a plain/text file but the application type was of "CIF
move application" (I assume from the comment tag)

So I added

          <sub-class-of type="text/plain"/>


<?xml version="1.0" ?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-iwl">
          <sub-class-of type="text/plain"/>
        <comment>CIF move application</comment>
    <glob pattern="*.iwl"/></mime-type>
</mime-info>

Once I had done this nautilus allowed me to assign a default application
separately from the default plain/text type application.

thanks,

Dave.



On 10/10/06, NoOp <glgxg at mfire.com> wrote:
>
> David Holden wrote:
>
> >
> > Hi Andy, thanks for the reply. Sorry I was probably not specific enough,
> the
> > problem I have is I have a "local" mime type, e.g.
> >
> > file.iwf
> >
> > the iwf type is specific to us.
> >
> > I want to associated this type with an application.
> >
> >
> > However nautlius seems to associate all the file suffixes it does not
> know
> > with type "text", so if I set the associate application with this file
> type
> > it does it for all "text" types which is not what I want.
> >
> > I would like it to associate a particular application with all files
> with
> > suffix .iwf.
> >
> >
>
> These might help:
> http://freedesktop.org/wiki/Standards_2fshared_2dmime_2dinfo_2dspec
> http://freedesktop.org/wiki/Standards_2fAddingMIMETutor
>
> http://acd.ucar.edu/~fredrick/linux/mime/
> http://www.ces.clemson.edu/linux/fc4_desktop.shtml
> [Fedora based info but useful anyway]
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20061011/8925cf6e/attachment.html>


More information about the ubuntu-users mailing list