language selecter crashing when trying to change language region german-german to german-switzerland

Bug #1758141 reported by sevku
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
language-selector (Ubuntu)
Opinion
Undecided
Unassigned

Bug Description

language selecter crashing when trying to change language region german-german to german-switzerland

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: language-selector-gnome 0.165.4
ProcVersionSignature: Ubuntu 4.13.0-37.42~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-37-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Mar 22 20:27:05 2018
ExecutablePath: /usr/bin/gnome-language-selector
InstallationDate: Installed on 2017-12-05 (107 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
InterpreterPath: /usr/bin/python3.5
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 SHELL=/bin/bash
 LANG=de_DE.UTF-8
 LANGUAGE=de_DE
 XDG_RUNTIME_DIR=<set>
SourcePackage: language-selector
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
sevku (severin-kunz) wrote :
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Thanks for your report.

Can you please start it from a terminal window with:

gnome-language-selector

Then try to change region, and if it crashes again, please let us know the terminal output in a comment here.

Changed in language-selector (Ubuntu):
status: New → Incomplete
Revision history for this message
sevku (severin-kunz) wrote :

I just did that, the crash happens every time without exception. I can not change the region.

This is the output:

kunzseverin@kunzseverin-ThinkPad-T430s:~$ gnome-language-selector
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 67, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 79, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 1096, in on_combobox_locale_chooser_changed
    self.writeUserFormats()
  File "/usr/lib/python3/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 777, in writeUserFormats
    self.writeUserFormatsSetting(userFormats=code)
  File "/usr/lib/python3/dist-packages/LanguageSelector/LanguageSelector.py", line 75, in writeUserFormatsSetting
    iface.SetFormatsLocale(macr['SYSLOCALE'])
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.Accounts.Error.Failed: running '/usr/share/language-tools/save-to-pam-env' failed: no output
kunzseverin@kunzseverin-ThinkPad-T430s:~$

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Ok. Somehow it fails when trying to save the new value to ~/.pam_environment. Can you please run these three commands and show us what they output:

cat ~/.pam_environment

ls -ld ~

ls -l ~/.pam_environment

Revision history for this message
sevku (severin-kunz) wrote :

kunzseverin@kunzseverin-ThinkPad-T430s:~$ cat ~/.pam_environment
kunzseverin@kunzseverin-ThinkPad-T430s:~$ ls -ld ~
drwxr-xr-x 78 kunzseverin kunzseverin 4096 Mär 22 21:51 /home/kunzseverin
kunzseverin@kunzseverin-ThinkPad-T430s:~$ ls -l ~/.pam_environment
-rw-r--r-- 1 root root 0 Mär 12 19:16 /home/kunzseverin/.pam_environment

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

For some reason your ~/.pam_environment is owned by root, which it should not be. Run this command to fix it:

sudo chown kunzseverin: ~/.pam_environment

Changed in language-selector (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
sevku (severin-kunz) wrote :

Thank you very much for your help.

Somehow you have changed this to Invalid. While I can see that this is "just" a problem with permission, I don't think that the program should crash if it doesnt have permission (for whatever buggy reason). The program should detect that and give a meaningful error message to the user and not just crash.

I have reverted your edit of changing the status to Invalid due to these reasons.

Changed in language-selector (Ubuntu):
status: Invalid → Incomplete
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Meaningful, highly visible error messages are nice.

But if config files in $HOME, which programs need to write to, are owned by root, you can't expect your system to work. Programs typically crash then; root owned files in $HOME may even prevent you from being able to log in.

If you can show me a reproducible use case where ~/.pam_environment gets owned by root through normal use of the system, it's indeed a bug which should be fixed. But probably it happened via some mistake you did yourself, and error handling can't reasonably anticipate every possible user error. ;)

With that said, in this case the program did provide useful debugging info; it did "not just crash":

running '/usr/share/language-tools/save-to-pam-env' failed: no output

That's why I easily could point you to what the problem was.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.