FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Desktop

 
 
LinkBack Thread Tools
 
Old 02-19-2009, 10:17 AM
Caolán McNamara
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

So, here's the example scenario: Someone writes an extension for
OpenOffice.org writer which adds a file format importer and that gets
packaged into Fedora. Is there a way to then register the extra
mime-type that writer now supports if, and only if, that extension is
installed.

The mime-type field in .desktops
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
basically assumes a static list of supported mime-types. Adding the
mime-type to the writer list would claim that it always can open the
type, which isn't true if the extension isn't installed.

So is the right solution to install a new .destop along with that
extension with NoDisplay=true set and the list of extra mime-types that
the extension adds to writer and then use the same Exec line from the
normal parent package .desktop ?

C.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 07:51 AM
Alexander Larsson
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

On Thu, 2009-02-19 at 11:17 +0000, Caolán McNamara wrote:
> So, here's the example scenario: Someone writes an extension for
> OpenOffice.org writer which adds a file format importer and that gets
> packaged into Fedora. Is there a way to then register the extra
> mime-type that writer now supports if, and only if, that extension is
> installed.
>
> The mime-type field in .desktops
> http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
> basically assumes a static list of supported mime-types. Adding the
> mime-type to the writer list would claim that it always can open the
> type, which isn't true if the extension isn't installed.

Yeah, this is a bit of a problem. Especially with things like apps using
gstreamer thus being one step removed from what filetypes are supported.

> So is the right solution to install a new .destop along with that
> extension with NoDisplay=true set and the list of extra mime-types that
> the extension adds to writer and then use the same Exec line from the
> normal parent package .desktop ?

This sounds like it could work. Have you tried it? I can't think of a
better approach really.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 08:03 AM
Caolán McNamara
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

On Tue, 2009-02-24 at 09:51 +0100, Alexander Larsson wrote:
> On Thu, 2009-02-19 at 11:17 +0000, Caolán McNamara wrote:
> > So is the right solution to install a new .destop along with that
> > extension with NoDisplay=true set and the list of extra mime-types that
> > the extension adds to writer and then use the same Exec line from the
> > normal parent package .desktop ?
>
> This sounds like it could work. Have you tried it? I can't think of a
> better approach really.

Yeah, seems to work. For the rawhide openoffice.org-javafilter rpm which
adds import filters to OOo for weird-ass small-device formats like
PocketWord and AportisDoc I tried a openoffice.org-javafilter.desktop
of...

[Desktop Entry]
Version=1.0
Type=Application
Name=Small Device Format Importer
Exec=openoffice.org %U
MimeType=application/x-aportisdoc;application/x-pocket-word;
NoDisplay=true

and it seemed to work just fine. Definitely made nautilus launch OOo for
those types anyway.

C.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 09:36 AM
Nicu Buculei
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

Caolán McNamara wrote:

So, here's the example scenario: Someone writes an extension for
OpenOffice.org writer which adds a file format importer and that gets
packaged into Fedora. Is there a way to then register the extra
mime-type that writer now supports if, and only if, that extension is
installed.


This is supposed to also work the other way: with the extension NOT
installed an user click on a file of that type and PackageKit pop-up,
ask about installing the extension, do its job, the extension is
installed and the file successfully opened?


--
nicu :: http://nicubunu.ro :: http://nicubunu.blogspot.com/
photography: http://photoblog.nicubunu.ro/
my Fedora stuff: http://fedora.nicubunu.ro/

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 09:45 AM
Caolán McNamara
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

On Tue, 2009-02-24 at 12:36 +0200, Nicu Buculei wrote:
> Caolán McNamara wrote:
> > So, here's the example scenario: Someone writes an extension for
> > OpenOffice.org writer which adds a file format importer and that gets
> > packaged into Fedora. Is there a way to then register the extra
> > mime-type that writer now supports if, and only if, that extension is
> > installed.
>
> This is supposed to also work the other way: with the extension NOT
> installed an user click on a file of that type and PackageKit pop-up,
> ask about installing the extension, do its job, the extension is
> installed and the file successfully opened?

Is that a question or a statement ? I mean, is that a wish-list, or is
it something which has been already implemented and is supposed to work
right now ? If it is, what's the mechanics behind PackageKit determining
the right package to provide a handler for the extension, is it .desktop
file parsing for handled mime-types ?

C.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 09:47 AM
Bastien Nocera
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

On Tue, 2009-02-24 at 12:36 +0200, Nicu Buculei wrote:
> Caolán McNamara wrote:
> > So, here's the example scenario: Someone writes an extension for
> > OpenOffice.org writer which adds a file format importer and that gets
> > packaged into Fedora. Is there a way to then register the extra
> > mime-type that writer now supports if, and only if, that extension is
> > installed.
>
> This is supposed to also work the other way: with the extension NOT
> installed an user click on a file of that type and PackageKit pop-up,
> ask about installing the extension, do its job, the extension is
> installed and the file successfully opened?

Then package-kit can't find anything, because you haven't registered the
mime-type in any desktop files, so the fact that it's supported isn't
advertised in the RPM headers.

So the short answer is that you need a desktop file.

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 10:03 AM
Nicu Buculei
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

Caolán McNamara wrote:

On Tue, 2009-02-24 at 12:36 +0200, Nicu Buculei wrote:

Caolán McNamara wrote:

So, here's the example scenario: Someone writes an extension for
OpenOffice.org writer which adds a file format importer and that gets
packaged into Fedora. Is there a way to then register the extra
mime-type that writer now supports if, and only if, that extension is
installed.
This is supposed to also work the other way: with the extension NOT
installed an user click on a file of that type and PackageKit pop-up,
ask about installing the extension, do its job, the extension is
installed and the file successfully opened?


Is that a question or a statement ? I mean, is that a wish-list, or is
it something which has been already implemented and is supposed to work
right now ? If it is, what's the mechanics behind PackageKit determining
the right package to provide a handler for the extension, is it .desktop
file parsing for handled mime-types ?


It was a honest question, since PackageKit is able to do such things as
not only installing codecs when needed but even installing fonts when an
application needs them, finding the correct application to open a file
seems a logical thing from an usability point of view.


--
nicu :: http://nicubunu.ro :: http://nicubunu.blogspot.com/

--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 
Old 02-24-2009, 11:59 AM
Richard Hughes
 
Default Best way to register a file format plugin for an app with nautilus's mime-handler etc.

On Tue, 2009-02-24 at 10:47 +0000, Bastien Nocera wrote:
> Then package-kit can't find anything, because you haven't registered
> the mime-type in any desktop files, so the fact that it's supported
> isn't advertised in the RPM headers.

Agreed. At the moment the Fedora 11 rebuild is generating mime type data
for all the packages that ship desktop files and adding them as rpm
provides.

> So the short answer is that you need a desktop file.

Add a desktop file, get it built in koji, double click extension, and
PackageKit will do the rest.

Richard.


--
Fedora-desktop-list mailing list
Fedora-desktop-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-desktop-list
 

Thread Tools




All times are GMT. The time now is 12:07 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org