[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Determining application handlers for given mimetypes



On Fri, 2008-02-15 at 11:08 +0000, Shalom Bhooshi wrote:
> What is the recommended way to get the application (and more
> specificallycommand) incharge of handling a particular mimetype?

This should work:

  use Gnome2::VFS -init;
  my $type = Gnome2::VFS::Mime::Type->new ('text/html');
  my $app = $type->get_default_application;
  die 'no app found' unless defined $app;
  $app->launch ('http://google.com');

I'm unable to get it working with anything older than libgnomevfs 2.10,
though.  But that might be due to the incomplete setup of my sandboxes.

Also, due to changes in libgnomevfs 2.10 that broke the bindings, this
might need the newly released Gnome2::VFS 1.081.

-- 
Bye,
-Torsten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]