Ubuntu

Lucid to Precise: language-selector changed my desktop 's default language to Turkish and Latvian

Reported by Martin-Éric Racine on 2012-02-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Undecided
Unassigned

Bug Description

After upgrading my LTSP host from Lucid to Precise, my desktop no longer was in Finnish. Instead, a combination of Latvian and Turkish affected my usability. Looking into my user files, I noticed that something had forced the corresponding locales as libc environments e.g. LANG, LC_MESSAGE, etc. into my .profile.

Removing these by hands did not resolve the situation.

Instead, I needed to go to language-selector to install Latvian and Turkish packages, log out of my GNOME session, log in again and then make language-selector purge these localisations.

This mostly worked, except that 'env' still reports that GDM_LANG=tr, and I haven't found where to fix this.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: language-selector-gnome 0.62
ProcVersionSignature: Ubuntu 3.2.0-12.21-generic-pae 3.2.2
Uname: Linux 3.2.0-12-generic-pae i686
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Wed Feb 1 15:00:03 2012
PackageArchitecture: all
SourcePackage: language-selector
UpgradeStatus: Upgraded to precise on 2010-05-01 (641 days ago)

Martin-Éric Racine (q-funk) wrote :
Martin Pitt (pitti) wrote :

Can you please check which locales are set in /etc/default/locale, /etc/environment, ~/.profile, and ~/.dmrc? It seems that ~/.dmrc has a wrong locale setting, so gdm forces that to overwrite the one set in /etc/ and ~/.profile.

Changed in language-selector (Ubuntu):
status: New → Incomplete
Martin-Éric Racine (q-funk) wrote :

$ cat /etc/default/locale
LANGUAGE="fi:en"
LANG="fi_FI.UTF-8"
LC_MESSAGES="fi_FI.UTF-8"
LC_CTYPE="fi_FI.UTF-8"
LC_COLLATE="fi_FI.UTF-8"

$ cat /etc/environment
LANGUAGE="tr:fi:lv:en"

$ cat .profile
(stock file from /etc/skel)

$ cat .dmrc

[Desktop]
Session=gnome
Language=fi_FI.UTF-8

Layout=fi classic

Martin-Éric Racine (q-funk) wrote :

It thus seems that something during the upgrade force-hacked both .profile (which I previously found and manually fixed) and /etc/environment (which I hadn't found until now).

I vaguely recall something similar happening after Maverick or Natty, but not if or how it was fixed.

Martin-Éric Racine (q-funk) wrote :

$ check-language-support
aspell-en aspell-et aspell-fi aspell-fr aspell-lv aspell-ru aspell-sv firefox-locale-fr firefox-locale-lv firefox-locale-ru firefox-locale-sv firefox-locale-tr hunspell-ru language-pack-fr language-pack-gnome-en language-pack-gnome-fr language-pack-gnome-lv language-pack-gnome-ru language-pack-gnome-sv language-pack-gnome-tr language-pack-lv language-pack-ru language-pack-sv language-pack-tr libreoffice-help-en-gb libreoffice-help-et libreoffice-help-fr libreoffice-help-ru libreoffice-help-sv libreoffice-l10n-en-gb libreoffice-l10n-en-za libreoffice-l10n-et libreoffice-l10n-fr libreoffice-l10n-lv libreoffice-l10n-ru libreoffice-l10n-sv libreoffice-l10n-tr mozvoikko myspell-en-au myspell-en-gb myspell-en-za myspell-lv myspell-ru myspell-sv-se mythes-en-au poppler-data

This also reports various languages which I don't recall having selected on this system as missing. I wonder why. At best, I recall previously having the old language-support-writing packages for the corresponding languages, just to get the corresponsing spell checking aids, but I never installed the localisation packages for any of these. How exactly can I uset them?

Martin-Éric Racine (q-funk) wrote :

Erm... that would be unset, as in unselect. Typos r us.

Martin Pitt (pitti) wrote :

> $ cat /etc/environment
> LANGUAGE="tr:fi:lv:en"

that would be it. Please eiter use language-selector to remove Turkish and Latvian from the list of languages (drag&drop them below "English" into the grayed out section), or edit the file manually.

check-language-support installs packages for all available locales now, i. e. what 'locale -a' says.

Changed in language-selector (Ubuntu):
status: Incomplete → Invalid
Martin-Éric Racine (q-funk) wrote :

Why was this bug marked as invalid? Something obviously hacked into /etc/environment and .profile without asking, upon upgrading from Lucid to Precise, and this needs to be fixed.

Martin-Éric Racine (q-funk) wrote :

Part of the issue seems to be this:

It appears that some files changed ownership between language-pack-** and language-pack-**-base since Lucid and, in cases when these packages were previously removed, but not purged, the libc6 locale that was generated remains, so check-language-support wants to pull everything back in.

The only part that remains unclear is why .profile and /etc/environment get silently hacked upon the first logon into a desktop that was freshly upgraded from Lucid to Precise.

Martin-Éric Racine (q-funk) wrote :

Actually, it seems to be that even after re-installing and purging the packages for the corresponding languages, some trace remains of which ones they were:

$ locale -a
C
C.UTF-8
fi_FI.utf8
POSIX

...and yet 'dpkg-reconfigure locales' produces:

$ sudo dpkg-reconfigure locales
Generating locales...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
  et_EE.UTF-8... done
  fi_FI.UTF-8... done
  fr_BE.UTF-8... done
  fr_CA.UTF-8... done
  fr_CH.UTF-8... done
  fr_FR.UTF-8... done
  fr_LU.UTF-8... done
  lv_LV.UTF-8... done
  ru_RU.KOI8-R... done
  ru_RU.UTF-8... done
  ru_UA.UTF-8... done
  sv_FI.UTF-8... done
  sv_SE.UTF-8... done
Generation complete.

Gunnar Hjalmarsson (gunnarhj) wrote :

Try:

  sudo locale-gen --purge

I'd like to take a closer look at this bug, so I mark it as "In Progress" to not forget about it. ;-)

Changed in language-selector (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
status: Invalid → In Progress
Martin-Éric Racine (q-funk) wrote :

Thanks, Gunnar. I tried that but, nope, it just regenerated locales it should not have, as above at #10.

Martin-Éric Racine (q-funk) wrote :

Apparently, the content of /var/lib/locales/supported.d/local never gets cleaned up and it retained the list of all locales ever generated. That at least explains why "locale-gen --purge" re-generated the same unwanted locales.

$ dpkg -S /var/lib/locales/supported.d/local
dpkg-query: no path found matching pattern /var/lib/locales/supported.d/local

So, I deleted it to see whether it would improve anything, before I ran "locale-gen --purge" again. This indeed finally solved the issue of generating spurrious locales. Now, remains the question of which package should perform this clean-up upon upgrade, so figure out where to commit the fix.

The question as to what appended unwanted locales to my .profile and to /etc/environment upon upgrading from Lucid to Precise remains open, though.

Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for letting us know of your partial progress. I'll get back to you in a few days.

Martin-Éric Racine (q-funk) wrote :

It appears that .pam_environment also gets locales-related variables appended as a result of this upgrade. I had to manually delete it on the effected host, before locales worked remotely well again.

Martin Pitt (pitti) wrote :

> Apparently, the content of /var/lib/locales/supported.d/local never gets cleaned up

Yes, that's being created by "sudo locale-gen xx_YY", i. e. if you manually build a locale. Perhaps --purge should remove it and the locally built locales?

no longer affects: langpack-locales (Ubuntu)
Martin-Éric Racine (q-funk) wrote :

That's what I was thinking too, that purge should remove it when found, since Ubuntu uses separate files in /var/lib/locales/supported.d/ that get installed by language-pack-** anyhow nowadays.

However, in the event that someone would need to generate legacy locales e.g. Latin or KOI-8, the correct procedure for creating a directory there to add them as needed would need to be documented too.

Gunnar Hjalmarsson (gunnarhj) wrote :

Quite a few days have passed since I said I'd get back to you... Sorry.

However, since no other bug report has described the same issue, we have reasons to fear that the settings were inconsistent also in Lucid, don't we? Also, since you mentioned GNOME session, does it mean that you use a GNOME like desktop? Bug #1035219 shows how that might affect the settings.

But it's really just guess-work. Setting status Incomplete, which means that this bug may expire if nobody keeps it alive by setting some other status. But please don't do so without adding some more relevant info.

Changed in language-selector (Ubuntu):
assignee: Gunnar Hjalmarsson (gunnarhj) → nobody
status: In Progress → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for language-selector (Ubuntu) because there has been no activity for 60 days.]

Changed in language-selector (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers