#1117382 gnome-session: XML files should open in a text editor by default, rather than in a web browser

#1117382#5
Date:
2025-10-05 15:03:25 UTC
From:
To:
Dear Maintainer,

By default, XML files should open in a text editor rather than a web browser.

This is particularly evident when editing a fontconfig .conf file, which
currently opens in a web browser. This is undesirable because web browsers are
read-only and do not allow editing.

Steps:
1. Right-click on an XML file (e.g. a fontconfig .conf file)
2. Select 'Open with…'
3. 'Standard App' is the default web browser (Firefox, if installed) ➜ not
desired
4. 'Recommended Apps' are Firefox and Chromium if both are installed ➜ not
desired

What should happen:
The 'Standard App' for an XML file should be the default text editor.
Alternatively, the 'Recommended Apps' list should include the default text
editor.

As both XML and HTML are markup languages, resolving this issue may be
challenging. Therefore, the next best option would be to enable users to open
XML files in their preferred text editor.

I am not sure which Debian package this bug should be assigned to. However,
please change it if necessary, as I don't believe it is GNOME-specific.

Best,
Amr

#1117382#10
Date:
2025-10-05 16:00:13 UTC
From:
To:
It is GNOME-specific, and in fact gnome-session might be the correct
GNOME package (or rather, gnome-session-common). Apps only announce
whether they *can* open a particular file format, and it's up to the
desktop environment to have a preference for which of the apps that can
open a particular file format *should* open it by default.

Specifically, in GNOME the preference order is controlled by
/usr/share/applications/gnome-mimeapps.list, and in non-GNOME
environments it's controlled by some other
/usr/share/applications/*-mimeapps.list.

(A corollary is that if you want this to change in non-GNOME desktop
environments, you would have to open separate bugs for those other
desktop environments.)

However, none of the text editors currently announce that they want to
be considered for XML and other markup/programming formats: only the web
browsers and gnome-builder announce specific support for text/xml and
application/xml, and only gnome-builder for programming languages like
C. Perhaps gnome-text-editor, gedit, etc. should also announce
themselves as a good handler for programming and markup languages, but
currently they do not.

     smcv

#1117382#15
Date:
2025-10-06 08:11:04 UTC
From:
To:
<span style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Von: Simon McVittie <smcv@debian.org></span><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Gesendet: Sonntag, 5. Oktober 2025 18:00 Uhr</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">An: Amr Ibrahim <amribrahim1987@hotmail.com>; 1117382@bugs.debian.org <1117382@bugs.debian.org></div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Betreff: Re: Bug#1117382: gnome-session: XML files should open in a text editor by default, rather than in a web browser</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> However, none of the text editors currently announce that they want to</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> be considered for XML and other markup/programming formats: only the web</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> browsers and gnome-builder announce specific support for text/xml and</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> application/xml, and only gnome-builder for programming languages like</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> C. Perhaps gnome-text-editor, gedit, etc. should also announce</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> themselves as a good handler for programming and markup languages, but</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">> currently they do not.</div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div class="elementToProof" style="font-family: "Aptos", "Aptos_EmbeddedFont", "Aptos_MSFontService", "Calibri", "Helvetica", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Yes, given how popular the XML format is for configuration files, it makes sense for both gnome-text-editor and gedit to offer themselves as suitable XML file handlers.</div>