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

Re: Fixing the mime horror ini Debian



 ❦ 13 juillet 2012 12:18 CEST, Per Olofsson <pelle@dsv.su.se> :

> 1. Rewrite xdg-utils so that it is robust and always works. Instead of
> relying on desktop environments, it should do the needed work by
> itself. Currently it's something of a hack, especially when running in
> "generic" mode. It should probably be written in another language than
> shell (e.g. Perl, Python, C). A nicer user interface for the command
> line wouldn't hurt either.
>
> 2. Make all other packages either use xdg-utils or follow the
> freedesktop.org MIME specs.

Yes, I also think this is a good plan.

Relying on existing desktop tools is too difficult. They get deprecated
(for example, gnome-open has been replaced by gvfs-open) or they cannot
be adapted easily because maintainers usually don't care about those
corner use cases. For example, gvfs-open does not wait for the viewer to
terminate, this makes difficult for mailers to pass a temporary
file. See:
 - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677430
 - https://bugzilla.gnome.org/show_bug.cgi?id=652262
 - https://bugzilla.gnome.org/show_bug.cgi?id=678504

Once you get a working xdg-open, you can get a compatibility layer for
the mailcap stuff:
  */*; xdg-open '%s'; test=test -n "$DISPLAY"

Or something more sensible like:
  image/gif; xdg-open -t image/gif '%s'; test=test -n "$DISPLAY"
  image/png; xdg-open -t image/png '%s'; test=test -n "$DISPLAY"
  [...]

The remaining problem is defining the priority of such entries compared
to entries inserted by packages still supporting mailcap.
-- 
#if 0
	2.2.16 /usr/src/linux/fs/buffer.c

Attachment: pgpVuoXrURAKn.pgp
Description: PGP signature


Reply to: