From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: MIME database Date: Tue, 28 Nov 2017 10:24:25 +0100 Message-ID: <87k1ya3gdy.fsf@gnu.org> References: <20171127125053.C13FF4E0018@mta-1.openmailbox.og> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJc8l-0000Ej-V9 for guix-devel@gnu.org; Tue, 28 Nov 2017 04:25:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJc8h-0001nz-11 for guix-devel@gnu.org; Tue, 28 Nov 2017 04:25:19 -0500 Received: from [141.255.128.1] (port=34971 helo=hera.aquilenet.fr) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eJc8g-0001ni-Qw for guix-devel@gnu.org; Tue, 28 Nov 2017 04:25:14 -0500 In-Reply-To: <20171127125053.C13FF4E0018@mta-1.openmailbox.og> (brendan tildesley's message of "Mon, 27 Nov 2017 12:50:53 -0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: brendan.tildesley@openmailbox.org Cc: guix-devel@gnu.org Hello, (Moving the discussions to guix-devel.) brendan.tildesley@openmailbox.org skribis: > I was wondering why my pdf documents were getting opened in Gimp by defau= lt instead of Evince, so I investigated xdg-open and found it uses mimeopen= as a fallback, and packaged it. Turns out it didn't make a difference and = the issue was simply that the generated mimedata.cache in xdg-mime-database= had Gimp listed before Evince. Oh, good catch. Profile generation is sensitive to package order; so indeed, if GIMP comes first, it =E2=80=9Cwins.=E2=80=9D > I was also I little confused that xdg-mime-database produces so many conf= licts with shared-mime-info. It's role appears to be to update the data in = shared-mime-data and have it overshadow the original data when conflicts a= re resolved during profile generation. Looks ugly seeing all those conflict= s though. I guess it=E2=80=99s OK in that users normally don=E2=80=99t want to instal= l these packages at all, let alone installing both in the same profile. > I had a look at Fedora's version. They just have a single shared-mime-dat= a package that runs update-mime-database, but also they add a few changes t= o make Evince open pdf's instead of Gimp, among other changes. > > This makes me feel that it's desirable for us to also tweak mimedata to m= ake it more sensible -- Pdf's should open in a pdf reader before it opens i= n an image editor. It seems unrealistic to only tweak upstream projects to = make all this mimedata mesh together perfectly to produce ideal default beh= aviour. Right, so I think the immediate course of action here would be to patch GIMP=E2=80=99s MIME data so that it does not register as a PDF viewer. If we stumble upon other issues like that, we can fix them similarly. How does that sound? Thanks for investigating! Ludo=E2=80=99.