[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user
Steve Langasek
steve.langasek at canonical.com
Sat Mar 3 03:46:14 UTC 2012
Thanks for the patch! some feedback:
- the check for x11-display matches all sessions including console sessions, because x11-display is always set. We need to specifically check for a non-empty value here.
- the rotatescreen.sh script specifically assumes that getXconsole() can be applied once for each value of $displaynum, not just the currently active session. This is already broken and we should probably clean it up.
- sleep.sh, screenblank.sh and lid.sh assume that they can use getXuser() to get the user for *each* X display so that they can lock the screen (e.g., before suspending). This is important to preserve, since there may indeed be multiple X sessions running simultaneously (guest sessions, etc). This means we also need to be able to match on non-active sessions.
- the && unix_user in the check returns false if root is logged in to an X session. While this is discouraged and unlikely, we don't really want to fail to handle such sessions. Fixed by omitting this part of the check.
- the $user variable set by getXuser is used elsewhere as the argument to su, but the current check returns a numeric uid which doesn't work. We need to translate this to a username to retain compatibility.
I've adjusted the patch accordingly and committed it to the bzr repo.
Will upload this to precise shortly.
** Changed in: acpi-support (Ubuntu)
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to acpi-support in Ubuntu.
https://bugs.launchpad.net/bugs/933626
Title:
acpi-support should use ck-list-sessions to determine active X display
and X user
Status in “acpi-support” package in Ubuntu:
In Progress
Bug description:
The acpi-support scripts use 'ps' and 'who' output to determine the current active X display and X user (in getXconsole and getXuser). Currently, LightDM does not write to utmp so 'who' does not output the correct information breaking getXconsole and getXuser.
ConsoleKit properly maintains the state of the console and probably
should be used instead.
I've attached a patch that re-implements getXconsole and getXuser by
calling ck-list-sessions.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions
More information about the foundations-bugs
mailing list