← Back to team overview

desktop-packages team mailing list archive

Re: [Bug 1448563] Re: terminal won't launch with a customized locale

 

> Gnome-terminal is unfortunately known to have troubles with non-UTF-8
> locales, see e.g. https://bugzilla.gnome.org/show_bug.cgi?id=732127.

> In your case, however, I suspect that you're doing something wrong with
> your installation (because you also seem to aim for UTF-8). It's weird
> to me that you use nonstandard tools to install them, rather than
> localedef or locale-gen.

> At the very least, what does "locale charmap" print with your locale? It
> should be "UTF-8".

Hi Egmont, and thanks for your attention to the bug.  I certainly may
have done something wrong; the online documentation about setting up a
custom locale that I was able to find is confusing and sparse, and there
seem to be very few tools to help an ordinary user customize a locale.
I'm no locale expert; my motivation was just to use 24-hour time, YYYY-
MM-DD dates, and the Metric system, even though I live in the US.

I originally tried using localedef directly, but it exited with code 1,
listing a slew of errors that didn't seem to have anything to do with
the modest customizations that I made to the locale.  Rather than spend
all day at it I tried the Python script that I mentioned in the bug
description, which calls localedef.  The script reported success, and my
simple locale-test program verified that I had installed the locale well
enough to get the date and time formats I wanted.  Unfortunately, once
my custom locale was installed, every time I launched a GUI program from
the command line I got a fontconfig() warning complaining about the
locale.

So I may have done something wrong, but I did succeed at getting the
date and time formats I wanted.  I filed the bug because I was able to
launch a terminal under Ubuntu 14.10, but once I upgraded to Ubuntu
15.04, then I couldn't.

$ LANG="rob_custom.UTF-8"
$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=rob_custom.UTF-8
LANGUAGE=en_US
LC_CTYPE="rob_custom.UTF-8"
LC_NUMERIC="rob_custom.UTF-8"
LC_TIME="rob_custom.UTF-8"
LC_COLLATE="rob_custom.UTF-8"
LC_MONETARY="rob_custom.UTF-8"
LC_MESSAGES="rob_custom.UTF-8"
LC_PAPER="rob_custom.UTF-8"
LC_NAME="rob_custom.UTF-8"
LC_ADDRESS="rob_custom.UTF-8"
LC_TELEPHONE="rob_custom.UTF-8"
LC_MEASUREMENT="rob_custom.UTF-8"
LC_IDENTIFICATION="rob_custom.UTF-8"
LC_ALL=
$ locale charmap
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
ANSI_X3.4-1968
$ 

Aha, the charmap isn't UTF-8 for some reason.


> You could also try setting LANG=<yourlocale> and LC_CTYPE=en_US.UTF-8
> simultaneously - does this work?

No, that doesn't seem to work.  The "locale" command shows LC_CTYPE as
"rob_custom.UTF-8" afterwards.

- Rob

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1448563

Title:
  terminal won't launch with a customized locale

Status in gnome-terminal package in Ubuntu:
  Confirmed

Bug description:
  Yesterday I upgraded to Ubuntu 15.04 "Vivid Vervet", and I couldn't
  launch a gnome-terminal.  Shift+Ctrl+T didn't seem to do anything, nor
  did typing "terminal" into the dash.  Fortunately, xterm still worked.
  Typing "ps aux" (into an xterm terminal) revealed a few instances
  marked "defunct".

  The problem turns out to be my custom locale.  (I didn't discover this
  myself, except by using Google.)  I typed "LANG=en_US.UTF-8" into my
  xterm terminal, and then "gnome-terminal &", and then I had a gnome-
  terminal running.

  This bug should be fairly easy to replicate once a custom locale has
  been installed.  I'll attach my custom locale file "rob_custom" to
  this bug, which could be used for testing the bug.  (My locale is
  based on en_US.UTF-8 but uses 24-hour time, YYYY-MM-DD dates, and the
  metric system.)

  To install the custom locale, go to
  http://lh.2xlibre.net/help/install_locale/ and download the
  "install_locale.py" script.  The first line of the script will need to
  be changed from ""#!usr/bin/env python" to "#!/usr/bin/python", and
  the script will need to be made executable of course.  Download the
  "rob_custom" file from this bug, and put it in
  /usr/share/i18n/locales/ .  Then run "install_locale.py
  /usr/share/i18n/locales/rob_custom", which should successfully install
  the locale.

  Installing the locale won't make it your default locale.  To change
  the locale temporarily, change the LANG environment variable, i.e.
  "LANG=rob_custom.UTF-8".

  The attachment to this bug consists of a .zip file composed of two
  files: my custom locale "rob_custom", and a simple program file
  locale-test.c, which can be compiled with the command "gcc -o locale-
  test locale-test.c".  The program displays the date and time strings
  according to the installed locale, which is useful for testing whether
  the locale has been changed successfully.

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: gnome-terminal 3.14.2-0ubuntu3
  ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
  Uname: Linux 3.19.0-15-generic x86_64
  ApportVersion: 2.17.2-0ubuntu1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Sat Apr 25 15:28:38 2015
  InstallationDate: Installed on 2013-11-24 (517 days ago)
  InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
  SourcePackage: gnome-terminal
  UpgradeStatus: Upgraded to vivid on 2015-04-24 (1 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1448563/+subscriptions


References