Have a way to dynamically change software associations at distribution level

PCMan pcman.tw at gmail.com
Tue Sep 1 07:24:24 PDT 2009


2009/9/1 Stanislav Brabec <sbrabec at suse.cz>:
> Didier Roche wrote:
>
>> Then, yes, distribution can patched to their preferences (eventually
>> adding UseByDefaultIn=all) and is able to deal with opening different
>> application in different desktop environment (cf the spec draft). I
>> want to have here Alex and David's opinion are they are more updated
>> on those problematics.
>
> Patching all desktop files in all distro to get required distro-specific
> behavior seems to be a bad approach, especially if a single code base
> should be used in more different products.
Totally agree.
> Example:
> "openSUSE Desktop GNOME" needs Nautilus as a default file browser.
> "openSUSE Mobile GNOME" need Clutter as a default file browser.
> Both should be done without modifying of Nautilus or Clutter desktop
> files.
>
> It implies:
>
> It is impossible to invent a way to select default application using
> only desktop files. External configuration (however optional) must be
> possible.
Totally agree with you on this issue.
It's much easier for distribution makers to handle default
applications in this way.
Patching every upstream desktop file is a bad approach.
Which application should be the default is not decided by upstream
authors, but distribution makers. So using external configuration
should be better than requiring things be modified in all upstream
sources.
> That is why I think:
>
> Desktop files should provide sufficient and exact information for the
> default application algorithm, but should not tell imperatives about the
> default.
True.
> Good information: MimeTypes, SuitedFor, Categories, SuitedForMimeTypes,
> maybe partially NotShowIn, OnlyShowIn.
>
> Bad information: InitialPreference (desktop ignorant and imperative),
> UseByDefaultIn (again an imperative).
>
> InitialPreference don't provide information, how well is the application
> integrated. It is just a number, higher number always wins. To fix this,
> it must be desktop specific, and exact scale must be defined. For
> example: 10 = uses the same GUI toolkit, 20 = uses the same high level
> toolkit, 30 = uses the same toolkit and respect the HIG of the
> environment, 40 = it is integrated with all possible features of the
> environment, 50 = other applications of the environment are aware of my
> application and coordinate with. Anyway, maybe it is an overkill, and
> more keywords like SuitedFor would work better.
>
> UseByDefaultIn should not exist at all. Not the upstream author, and
> even not the packages should decide about it. Only desktop integrator
> should do it. And desktop integrator cannot alter packages contents.
>
> Invalid sources: NoDisplay (it affects main menu, not association)
>
>
> The default application algorithm, independently on proposed
> implementation, must allow modifications of the result without
> modification of desktop files and without need to create any files in
> the home directory.
>
On Windows, upstream applications usually ask the users whether they
want to use this application as default for some file types upon
installation or first-time execution. Unless the file type is their
own private file formats and their applications are the only ones
supporting this format, few of them unconditionally set themselves as
the default by modifying system configurations. So, maybe we should
only set some sensible defaults for each distributions, but let the
users choose their own favorite apps easily instead of develop a way
to 'generate' a default list.
If I'm the user, I won't be happy if my favorite default application
for some file formats get changed automatically after I installed some
packages, and I don't know how to change them back.
Maybe it's the responsibility of package management tools to ask the
user whether the newly installed application should be associated with
the file types they support after the packages are installed.
Or, the file manager should prompt the users to choose one application
for the file to be opened when there was no default value provided by
distribution makers.
>
> --
> Best Regards / S pozdravem,
>
> Stanislav Brabec
> software developer
> ---------------------------------------------------------------------
> SUSE LINUX, s. r. o.                          e-mail: sbrabec at suse.cz
> Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
> 190 00 Praha 9                                  fax: +420 284 028 951
> Czech Republic                                    http://www.suse.cz/
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>


More information about the xdg mailing list