Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1786649

Summary: Fails to start because of non-UTF-8 locale after interactive PXE installation
Product: Red Hat Enterprise Linux 8 Reporter: advax
Component: gnome-terminalAssignee: Debarshi Ray <debarshir>
Status: CLOSED DUPLICATE QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.0CC: rstrode
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-11 13:32:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description advax 2019-12-26 19:08:59 UTC
Description of problem:

gnome-terminal does not start from Activities panel. From xterm, fails with
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached



Version-Release number of selected component (if applicable):

gnome-terminal-3.28.2-3.el8.x86_64

How reproducible:

Always

Additional info:

gnome-terminal-3.28.2-2.el7.x86_64 installs and works normally

This is not the same as 1695690; it is not related to VNC.
It does not appear related to LOCALE; changing LANG from C to en_US.UTF-8 makes no difference.

The only significant difference I can see between 3.28.2-3.el8 and 3.28.2-2.el7
is a minor difference in the schema and that the el8 RPM does not have a posttrans scriptlet.

The EL8 binary seems to work if the EL7 package is installed.

If /usr/libexec/gnome-terminal-server is started manually, gnome-terminal starts and connects to it, though with a different colour scheme.

Comment 1 Debarshi Ray 2020-05-27 15:01:07 UTC
First of all, note that /usr/bin/gnome-terminal isn't the main binary providing the GNOME Terminal application and it's windows. It only sends a request over D-Bus to /usr/libexec/gnome-terminal-server, the "server" to open a new window or tab.

Also, see:
https://wiki.gnome.org/Apps/Terminal/FAQ#Terminal_fails_to_start

Do you see anything in:
  $ journalctl _EXE=/usr/libexec/gnome-terminal-server

What does your /etc/locale.conf look like?

> fails with
> # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
>   Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

The fact that it's timing out makes me thing that something is busted.

How does this look like:
  $ ls -l /usr/libexec/gnome-terminal-server

> The EL8 binary seems to work if the EL7 package is installed.

Umm... what do you mean? You had the gnome-terminal RPM from both EL7 and EL8 installed?

Comment 2 advax 2020-06-12 18:49:36 UTC
(In reply to Debarshi Ray from comment #1)
> First of all, note that /usr/bin/gnome-terminal isn't the main binary
> providing the GNOME Terminal application and it's windows. It only sends a
> request over D-Bus to /usr/libexec/gnome-terminal-server, the "server" to
> open a new window or tab.
>
> Also, see:
> https://wiki.gnome.org/Apps/Terminal/FAQ#Terminal_fails_to_start
>
> Do you see anything in:
>   $ journalctl _EXE=/usr/libexec/gnome-terminal-server
>

Jun 11 19:40:29 localhost gnome-terminal-server[6952]: Display does not support owner-change; copy/paste will be broken!
Jun 12 10:39:24 localhost gnome-terminal-server[27033]: Non UTF-8 locale (ANSI_X3.4-1968) is not supported!
~

> What does your /etc/locale.conf look like?
LANG=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8

>
> > fails with
> > # Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0:
> >   Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached
>
> The fact that it's timing out makes me thing that something is busted.
>
> How does this look like:
>   $ ls -l /usr/libexec/gnome-terminal-server

With gnome-terminal-3.28.2-3.el8.x86_64 installed, I have
-rwxr-xr-x. 1 root root 415392 May 27  2019 /usr/libexec/gnome-terminal-server


> > The EL8 binary seems to work if the EL7 package is installed.
>
> Umm... what do you mean? You had the gnome-terminal RPM from both EL7 and
> EL8 installed?

With the EL7 RPM installed, a copy of the EL8 gnome-terminal binary works, presumably just sending a DBUS message to the server

  --------
I've found the issue. In the "region and language" settings for my account, the language was set to "unspecified". I don't recall  changing it. This is on a new laptop that I set up with CentOS8 for the first time. I have a US keyboard but set the language preference to United Kingdom to get correct spelling suggestions. If I change the language to "United Kingdom (English)" and restart the desktop session, the EL8 gnome-terminal works. The environment variable LANG changes from C to en_GB.UTF-8, matching locale.conf

At some point on one machine I had to set LANG=C to get something else to work, but not on this laptop. I can not find "LANG" or "LOCALE" in my .bash_* files. As I recall, I hit the gnome-terminal bug early on trying to get the system working, before I had got around to customizing anything much anyway.

I'm not particularly inclined to try re-installing my entire system just to try and reproduce the bug. It's possible that my initial language choice during install may have allowed the user account lanaguage to be left unset.

Comment 3 Debarshi Ray 2020-06-17 17:01:11 UTC
(In reply to advax from comment #2)
> (In reply to Debarshi Ray from comment #1)
> > Do you see anything in:
> >   $ journalctl _EXE=/usr/libexec/gnome-terminal-server
> >
> 
> Jun 11 19:40:29 localhost gnome-terminal-server[6952]: Display does not
> support owner-change; copy/paste will be broken!
> Jun 12 10:39:24 localhost gnome-terminal-server[27033]: Non UTF-8 locale
> (ANSI_X3.4-1968) is not supported!

Bingo:
Non UTF-8 locale (ANSI_X3.4-1968) is not supported!

> > > The EL8 binary seems to work if the EL7 package is installed.
> >
> > Umm... what do you mean? You had the gnome-terminal RPM from both EL7 and
> > EL8 installed?
> 
> With the EL7 RPM installed, a copy of the EL8 gnome-terminal binary works,
> presumably just sending a DBUS message to the server

Yeah. The /usr/bin/gnome-terminal binary does very little. It's the /usr/libexec/gnome-terminal-server binary that's refusing to start.

On RHEL 7, you could still start gnome-terminal with a non-UTF-8 locale, but not anymore on RHEL 8. That's why you are observing the above behaviour.

> I've found the issue. In the "region and language" settings for my account,
> the language was set to "unspecified". I don't recall  changing it. This is
> on a new laptop that I set up with CentOS8 for the first time. I have a US
> keyboard but set the language preference to United Kingdom to get correct
> spelling suggestions. If I change the language to "United Kingdom (English)"
> and restart the desktop session, the EL8 gnome-terminal works. The
> environment variable LANG changes from C to en_GB.UTF-8, matching locale.conf

Yes, that's it. Somehow your user had a non-UTF-8 locale set, which matches with the entry in your systemd journal.

The interesting part is that this (eg., LANG=C) still happened even though /etc/locale.conf (which has the global system-wide settings) has UTF-8 everywhere. Somehow the display manager (was it GDM?) that started your graphical session managed to confuse itself.

Anyway, we at least now know why GNOME Terminal wasn't starting. The remaining question might be about how your session managed to pick up a non-UTF-8 locale.

Comment 4 Ray Strode [halfline] 2020-06-17 17:49:22 UTC
are you using GDM (graphical login screen) or startx to start your session?

Comment 5 Ray Strode [halfline] 2020-06-17 18:46:03 UTC
So I can replicate the behavior you're seeing by deleting /etc/locale.conf

is it possible /etc/locale.conf may have gotten deleted in your situation?

Comment 6 Ray Strode [halfline] 2020-06-17 18:52:25 UTC
did you use a kickstart file to install? if so what "lang" did you specify in the kickstart file?

Comment 7 advax 2020-06-18 17:47:01 UTC
(In reply to Ray Strode [halfline] from comment #4)
> are you using GDM (graphical login screen) or startx to start your session?

I'm using GDM - whatever package installed by default with CentOS8. The following are running:
/usr/sbin/gdm
/usr/libexec/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart

Comment 8 advax 2020-06-18 18:24:37 UTC
(In reply to Ray Strode [halfline] from comment #6)
> did you use a kickstart file to install? if so what "lang" did you specify
> in the kickstart file?

I did not use a kickstart file on the command line. I used an interactive install over PXE.
That would have used /usr/share/anaconda/interactive-defaults.ks
anaconda.log shows the system setting locale to: en_US.UTF-8 during install

When I created my personal account I would have set the language to en_GB somehow, then logged in as that user and tried to get a shell window, which did not work. I then managed to run xterm from the application list. I don't remember the exact sequence and can't find my notes.
I did not try creating a different user account or logging in graphically as root or changing runlevel and using startx. I assumed a problem with gnome-terminal, especially since the earlier version worked.

Comment 9 advax 2020-06-18 18:45:09 UTC
(In reply to Ray Strode [halfline] from comment #5)
> So I can replicate the behavior you're seeing by deleting /etc/locale.conf
> 
> is it possible /etc/locale.conf may have gotten deleted in your situation?

Hmm.

I have /root/.bash_history back to the point at which I had logged in to set up my user environment, so the first commands are me changing the UID of the user account to the one I normally use.

At some point I saved a copy of /etc/locale.conf and then edited it, when I was trying to get gnome-terminal to work
The saved copy has
LANG=C
LC_NUMERIC=en_GB.UTF-8
The current copy has
LANG=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8

There is no evidence of my editing locale.conf prior to that. I'm not sure what process created it.

So there's an excellent chance that LANG was set to C when I created the user account, which may well have set up the desktop language as undefined.

Comment 10 Ray Strode [halfline] 2020-06-19 20:04:42 UTC
can you post /root/anaconda-ks.cfg ?

Comment 11 advax 2020-07-03 16:10:54 UTC
(In reply to Ray Strode [halfline] from comment #10)
> can you post /root/anaconda-ks.cfg ?

That's not on my system. I don't recall deleting it or otherwise cleaning /root

Comment 12 Debarshi Ray 2020-09-11 13:32:14 UTC
I am closing this as NOTABUG because ultimately gnome-terminal works as intended.

Comment 13 Debarshi Ray 2020-09-11 13:33:14 UTC

*** This bug has been marked as a duplicate of bug 1699369 ***