Hi,

I run leo in a debian box. I use to run the development version so I
have not installed the debian package and do not have the leo icon
associated with leo files. Yesterday I decided do such a nice
association. I use the kde4 desktop. I thought it would be trivial
(file type association was very easy with kde3) but it wasn't. There
are 2 main problems:

- kde4 doesn't use .desktop files as kde3 did. Instead it follows the
shared mime-info database specification.
- the functionality for change icon associated to a given file type
has not yet been implemented in the kde4 control center (system
settings -> advanced -> file associations)

So I did it by hand:

- copy the application-x-leo-outline.png icon from leo sources to the
proper icons directory used by kde4, in my case /usr/share/icons/
default.kde4/32x32/mimetypes

- in $HOME/.local/share/mime/packages put an Override.xml file with
the following content:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-
info">
    <mime-type type="application/x-leo-outline">
    <comment>Leo editor</comment>
        <glob pattern="*.leo"/>
        <icon name="application-x-leo-outline"/>
    </mime-type>
</mime-info>

- execute the update-mime-database command:
$ update-mime-database $HOME/.local/share/mime

Right now .leo files should have associated the leo icon. You can
check it with your file manager (konqueror, dolphin...).

- finally, in your file manager, right click a leo file, select Open
with..., put your path to leo and check the 'Remember application
association...' checkbox.

You are done.

I hope this guide will be useful to somebody. Please, let me know if
the association goal can be achieved more easily.

Vicent

PS: you maybe interested in reading
http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to