The gnome-terminal application fails to start when the system locale is set to non-UTF8

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Issue

  • gnome-terminal fails to initialize when system locale is set to non-UTF8. The logs below are found in /var/log/messages:
systemd[2119]: Starting GNOME Terminal Server...
gnome-terminal-server[2771]: Non UTF-8 locale (ANSI_X3.4-1968) is not supported!
systemd[2119]: gnome-terminal-server.service: Main process exited, code=exited, status=8/n/a
systemd[2119]: gnome-terminal-server.service: Failed with result 'exit-code'.
systemd[2119]: Failed to start GNOME Terminal Server.

systemd[2119]: Starting GNOME Terminal Server...
gnome-terminal-server[2771]: Locale not supported.
systemd[2119]: gnome-terminal-server.service: Main process exited, code=exited, status=9/n/a
systemd[2119]: gnome-terminal-server.service: Failed with result 'exit-code'.
systemd[2119]: Failed to start GNOME Terminal Server.
org.gnome.Terminal.desktop[2766]: # watch_established: "/org/gnome/desktop/a11y/" (establishing: 1)
org.gnome.Terminal.desktop[2766]: # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

Resolution

  • This issue is a configuration issue, not a bug. Use UTF8 locales on the system. For details about how to set system locale, refer to this documentation.

Note:- It is ideal to set non-UTF8 locale at the application level that requires it.

Root Cause

  • gnome-terminal in RHEL 7 was originally released with support for non-UTF8 locales. So dropping that support in the middle of the RHEL 7 lifecycle was considered a regression and it was fixed. However, in RHEL 8 and later releases, it does not support non-UTF8 locales anymore.
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.