light-locker-settings fails when lxc-container runs

Bug #1332781 reported by Stefan Metzmacher
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
light-locker-settings
Fix Committed
Undecided
Unassigned
light-locker-settings (Ubuntu)
New
Undecided
Unassigned

Bug Description

When there's a process running as uid that doesn't have an entry in /etc/passwd.
E.g. when running inside linux containers.

~$ light-locker-settings

** (light-locker-settings.py:18760): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-W03uyYgETk: Verbindungsaufbau abgelehnt

(light-locker-settings.py:18760): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2769:41: Expected a valid selector
Traceback (most recent call last):
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 552, in <module>
    main = LightLockerSettings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 97, in __init__
    self.init_settings()
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 249, in init_settings
    if self.check_running_process("xfce4-session"):
  File "/usr/share/light-locker-settings/light-locker-settings/light-locker-settings.py", line 196, in check_running_process
    if p.username == username:
  File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line 442, in username
    return pwd.getpwuid(self.uids.real).pw_name
KeyError: 'getpwuid(): uid not found: 81'

Tags: patch
Revision history for this message
Stefan Metzmacher (metze) wrote :
Revision history for this message
Stefan Metzmacher (metze) wrote :

This happens with light-locker-settings 1.2.1-0ubuntu1 on trusty

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Possible fix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Sean Davis (bluesabre)
Changed in light-locker-settings:
status: New → Fix Committed
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.