#1103722 gnome-terminal: does not open when locale in dconf isn't generated

Package:
gnome-terminal
Source:
gnome-terminal
Description:
GNOME terminal emulator application
Submitter:
Bart Martens
Date:
2025-04-22 22:27:01 UTC
Severity:
normal
#1103722#5
Date:
2025-04-20 23:20:02 UTC
From:
To:
When the value of /system/locale/region in .config/dconf/user is no
longer in /etc/locale.gen, then gnome-terminal silently fails to open.
The expected behavior is that gnome-terminal still opens. It could use
the locale from /etc/default/locale.

A quick fix/workaround is: dconf reset /system/locale/region

=== start of AI generated summary ===

Problem: GNOME Terminal Not Opening on Debian 12

After installing Debian 12, GNOME Terminal fails to open
without any error message. When running `gnome-terminal`
from an `xterm` window, the terminal fails to launch, and
`journalctl` shows a "locale not supported" error.

Diagnosis

1. Checking Locale Settings:

   The issue was tied to incorrect locale settings. By
   running the command `locale`, it showed that the system
   was set to use `en_US.UTF-8`, but the `dconf` database
   contained a conflicting `region=nl_BE.UTF-8` value under
   `/system/locale/region`. This value had not been
   generated on the system by `dpkg-reconfigure locales`.

2. Using `dconf dump /`:

   Running `dconf dump /` confirmed that the
   `region=nl_BE.UTF-8` setting was present, which was
   causing the mismatch between the locale setting and the
   system's available locales.

Solution

1. Generate the Missing Locale:

   Run the following command to generate the correct
   locales, including `nl_BE.UTF-8` if necessary: `sudo
   dpkg-reconfigure locales` Ensure that `en_US.UTF-8` (or
   any other desired locales) are selected during the
   process.

2. Reset the Incorrect `dconf` Locale Region:

   Since the `dconf` database had an incorrect region value,
   reset it by running: `dconf reset /system/locale/region`

3. Re-test GNOME Terminal:

   After generating the correct locales and resetting the
   `dconf` region, GNOME Terminal should now open correctly.

Conclusion

The issue was caused by a mismatch between the locale set in
the system (`en_US.UTF-8`) and a conflicting `region`
setting in `dconf` (`nl_BE.UTF-8`). By generating the
correct locale using `dpkg-reconfigure locales` and
resetting the `region` in `dconf`, the problem was resolved,
allowing GNOME Terminal to open normally.

=== end of AI generated summary ===

#1103722#10
Date:
2025-04-21 01:46:31 UTC
From:
To:
maintainer with steps for how to reproduce the bug rather than how to
solve it.

I figured out two ways to set the locale:
1. Install dconf-editor and set /system/locale/region to a nonexistent locale
Log out and log back in: this is an important step that the AI left out!

2. Open the Settings app (gnome-control-center). Go to the Region &
Language page and change the format to one of the listed locales.
The Settings app will helpfully tell you need to log out for it to go
into effect.
Somehow delete that locale from your system.


What do you think about
https://salsa.debian.org/gnome-team/meta-gnome3/-/merge_requests/15 as
a possible solution to this issue for Trixie?

I guess it would still be possible for someone to manually break their
system from the command line but I think it would be nice if people
did not need to use the command line to switch between languages (or
regional formats).

Thank you,
Jeremy Bícha

#1103722#15
Date:
2025-04-21 09:35:24 UTC
From:
To:
locale, then select that locale in gnome settings, and then use
"dpkg-reconfigure locales" for deleting that locale. No need to logout+login.

The expected behavior is that gnome-terminal still opens, like any other
application still opens.

Cheers,

Bart

#1103722#20
Date:
2025-04-21 10:31:59 UTC
From:
To:
Control: forwarded -1
https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7472

Thank you for the extra details; however I am unable to duplicate the
issue without logging out and logging back in.

I think you're missing my point. Why should someone need to use the
command line to switch to a different language or regional format?

One of the gnome-terminal maintainers proposed a patch a year ago at
https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7472 that
appears to fix your specific issue.

Thank you,
Jeremy Bícha

#1103722#27
Date:
2025-04-22 22:24:38 UTC
From:
To:
It does not solve the problem. But is an interesting change in itself.

Where did you get that? Do you mean a user? Or the sysadmin?

That is about a different issue. But the patch does also solve the issue of
this bug report, just tested.