{"id":7006,"date":"2014-05-16T08:58:37","date_gmt":"2014-05-16T08:58:37","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/16\/changing-ubuntu-locale-settings-by-gui-crashes-the-accounts-daemon-collection-of-common-programming-errors\/"},"modified":"2014-05-16T08:58:37","modified_gmt":"2014-05-16T08:58:37","slug":"changing-ubuntu-locale-settings-by-gui-crashes-the-accounts-daemon-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/16\/changing-ubuntu-locale-settings-by-gui-crashes-the-accounts-daemon-collection-of-common-programming-errors\/","title":{"rendered":"Changing Ubuntu locale settings by GUI crashes the accounts-daemon-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m usung Ubuntu 12.04 and after an automatic update it changed the system default encoding form UTF-8 to &#8220;ANSI_X3.4-1968&#8221;. I realized that when my code comments in Eclipse appeared with strange characters, and after realizing that the IDE was innocent, I&#8217;ve opened a terminal to check. When I type latin characters in a terminal window, such as \u00e7\u00e3\u00f5\u00e9\u00e8\u00ea&#8230;, a question mark shows instead. Same is I &#8216;cat&#8217; a text file. Changing Ubuntu locale settings by GUI crashes the accounts-daemon:<\/p>\n<pre><code>ExecutablePath: \/usr\/bin\/gnome-language-selector\nProcCmdline: \/usr\/bin\/python \/usr\/bin\/gnome-language-selector\n...\nFile \"\/usr\/lib\/python2.7\/dist-packages\/dbus\/connection.py\", line 651, in call_blocking      message, timeout)\nDBusException: org.freedesktop.Accounts.Error.Failed: running '\/usr\/share\/language-tools\/save-to-pam-env' failed: no output\n<\/code><\/pre>\n<p>I&#8217;ve then changed the save-to-pam-env adding a debug line and executed the lang-selector in a terminal:<\/p>\n<pre><code>gag@desktop~&gt; \/usr\/bin\/python \/usr\/bin\/gnome-language-selector\n(gnome-language-selector:17733): Gtk-WARNING **: Locale not supported by C library.\n    Using the fallback 'C' locale.\nlocale: Cannot set LC_CTYPE to default locale: No such file or directory\nlocale: Cannot set LC_MESSAGES to default locale: No such file or directory\nlocale: Cannot set LC_COLLATE to default locale: No such file or directory\nperl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\n    LANGUAGE = (unset),\n    LC_ALL = (unset),\n    LANG = \"pt_BR\"\n    are supported and installed on your system.\nperl: warning: Falling back to the standard locale (\"C\").\n...same message a dozen times...\nlocale: Cannot set LC_MESSAGES to default locale: No such file or directory\nlocale: Cannot set LC_COLLATE to default locale: No such file or directory\n\/usr\/lib\/python2.7\/dist-packages\/LanguageSelector\/gtk\/GtkLanguageSelector.py:858: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal\n  self._localeinfo.translate(loc, native=True) == defaultLangName):\n  \/\/the line below is my debug 'print'\n  exec: \/usr\/share\/language-tools\/save-to-pam-env \/home\/likewise-open\/CERTI\/gag pt_BR.UTF-8 \n<\/code><\/pre>\n<p>So, running this command by hand:<\/p>\n<pre><code>gag@desktop~&gt; \/usr\/share\/language-tools\/save-to-pam-env \/home\/likewise-open\/CERTI\/gag pt_BR.UTF-8\npt_BR.UTF-8\ngag@ccd-7840~&gt; locale\nLANG=\nLANGUAGE=\nLC_CTYPE=\"POSIX\"\nLC_NUMERIC=\"POSIX\"\nLC_TIME=\"POSIX\"\nLC_COLLATE=\"POSIX\"\nLC_MONETARY=\"POSIX\"\nLC_MESSAGES=\"POSIX\"\nLC_PAPER=\"POSIX\"\nLC_NAME=\"POSIX\"\nLC_ADDRESS=\"POSIX\"\nLC_TELEPHONE=\"POSIX\"\nLC_MEASUREMENT=\"POSIX\"\nLC_IDENTIFICATION=\"POSIX\"\nLC_ALL=\ngag@desktop~&gt; cat .pam_environment \nLANGUAGE=en\nLANG=en_US.UTF-8\nLC_NUMERIC=pt_BR.UTF-8\nLC_TIME=pt_BR.UTF-8\nLC_MONETARY=pt_BR.UTF-8\nLC_PAPER=pt_BR.UTF-8\nLC_NAME=pt_BR.UTF-8\nLC_ADDRESS=pt_BR.UTF-8\nLC_TELEPHONE=pt_BR.UTF-8\nLC_MEASUREMENT=pt_BR.UTF-8\nLC_IDENTIFICATION=pt_BR.UTF-8\n<\/code><\/pre>\n<p>It all seems fine, but restarting the PC and logging-in back things are still the same. By CLI I can see that the locales are properly installed:<\/p>\n<pre><code>gag@desktop~&gt; locale -a | grep pt\npt_BR.utf8\npt_PT.utf8\ngag@desktop~&gt; locale -m | grep UTF\nUTF-8\n<\/code><\/pre>\n<p>I&#8217;ve also tried:<\/p>\n<pre><code>sudo apt-get install language-pack-pt language-pack-pt-base\nsudo apt-get install --reinstall locales\n<\/code><\/pre>\n<p>With no effect. When I login with another account the encoding is ok. Ideas?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m usung Ubuntu 12.04 and after an automatic update it changed the system default encoding form UTF-8 to &#8220;ANSI_X3.4-1968&#8221;. I realized that when my code comments in Eclipse appeared with strange characters, and after realizing that the IDE was innocent, I&#8217;ve opened a terminal to check. When I type latin characters in a terminal window, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7006","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7006","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7006"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7006\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}