[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-07-03 Thread Iustin Pop
I concur with comment #5. This pulls in consolekit on many non-X
installations.

Is there a technical reason why lightdm can't be fixed to properly log
to wtmp? Or should the acpi-support-base be split into a base package
(no heavyweight dependencies) and acpi-support package? Well, we already
have that. But I mean, keep the separation between very basic ACPI
events and ones that depend/interact with a logged-in session.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-05-28 Thread Launchpad Bug Tracker
This bug was fixed in the package acpi-support - 0.138.1

---
acpi-support (0.138.1) oneiric-proposed; urgency=low

  * Added lenovo-touchpad2 from precise acpi-support-0.140 which supports
newer thinkpads that are in the certification process.
  * Backported power-funcs from precise acpi-support-0.140:
- Use ck-list-sessions to determine active X display and X user. This
  works around lightdm not always recording logins in wtmp (LP #870297).
  (LP: #933626)
 -- Ayan George ayan.geo...@canonical.com   Tue, 03 Apr 2012 11:45:09 -0400

** Changed in: acpi-support (Ubuntu Oneiric)
   Status: Fix Committed = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-05-23 Thread Martin Pitt
** Tags removed: verification-needed
** Tags added: verification-done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-05-22 Thread Ayan George
Verified that this works on a Sutton machine.

This does require a change to an OEM script that locally implements the
new getXuser though.  I'll let the OEM team know.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-05-21 Thread James M. Leddy
Hi Ayan, what were the results of your test?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-21 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/oneiric-proposed/acpi-support

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-21 Thread Ayan George
Thank you Clint!

I'll test on Monday.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-20 Thread Clint Byrum
Hello Ayan, or anyone else affected,

Accepted acpi-support into oneiric-proposed. The package will build now
and be available in a few hours. Please test and give feedback here. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed. Thank you in advance!

** Tags added: verification-needed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-16 Thread Martin Pitt
** Also affects: acpi-support (Ubuntu Precise)
   Importance: High
 Assignee: Steve Langasek (vorlon)
   Status: Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-16 Thread Martin Pitt
Uploaded with a more meaningful changelog, fixed LP bug refs, and fixed
version number. Thanks!

** Changed in: acpi-support (Ubuntu Oneiric)
   Status: New = Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-06 Thread Steve Langasek
 Debdiff from acpi-support .138 to .138-ubuntu1

acpi-support is an Ubuntu native package.  Please use 0.138-0.1 instead
as an SRU version number.


** Also affects: acpi-support (Ubuntu Oneiric)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-03 Thread Ayan George
Debdiff from acpi-support .138 to .138-ubuntu1

** Description changed:

+ SRU Justificaiton
+ -
  
- 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.  
+ Impact:
+ 
+ This bug impacts all Oneiric systems which use LightDM and are affected
+ by lp870297 (Lightdm logins not being logged in wtmp).
+ 
+ In Oneiric, acpi-support depends on wtmp entries to determine the active
+ console with getXconsole and getXuser.  Since LightDM doesn't write to
+ wtmp, this affects all systems that use acpi-support scripts to handle
+ ACPI hotkey events -- including yet to be released hardware in the
+ enablement/certification queue.
+ 
+ Fix:
+ 
+ The fix is to backport the changes made in Precise to Oneiric.  This
+ includes implementing getXuser and getXconsole with ConsoleKit (ck-list-
+ sessions).
+ 
+ Patch:
+ 
+ This change is already in acpi-support .139:
+ 
+   http://launchpadlibrarian.net/95198647/acpi-
+ support_0.138_0.139.diff.gz
+ 
+ I've attached a debdiff that backports that change to acpi-support .139
+ in Oneiric.
+ 
+ Regression Potential:
+ 
+ There should be very little potential for regression.  In fact, this
+ should fix machines affected by lp87029, including OEM systems.
+ 
+ 
+ 
+ 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.

** Patch added: acpi-support.diff
   
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+attachment/2997934/+files/acpi-support.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-04-03 Thread Ayan George
** Tags added: blocks-hwcert-enablement

** Changed in: acpi-support (Ubuntu)
Milestone: None = oneiric-updates

** Description changed:

  SRU Justificaiton
  -
  
  Impact:
  
  This bug impacts all Oneiric systems which use LightDM and are affected
  by lp870297 (Lightdm logins not being logged in wtmp).
  
  In Oneiric, acpi-support depends on wtmp entries to determine the active
  console with getXconsole and getXuser.  Since LightDM doesn't write to
  wtmp, this affects all systems that use acpi-support scripts to handle
  ACPI hotkey events -- including yet to be released hardware in the
  enablement/certification queue.
  
  Fix:
  
  The fix is to backport the changes made in Precise to Oneiric.  This
  includes implementing getXuser and getXconsole with ConsoleKit (ck-list-
  sessions).
  
  Patch:
  
  This change is already in acpi-support .139:
  
-   http://launchpadlibrarian.net/95198647/acpi-
+   http://launchpadlibrarian.net/95198647/acpi-
  support_0.138_0.139.diff.gz
  
  I've attached a debdiff that backports that change to acpi-support .139
  in Oneiric.
  
  Regression Potential:
  
  There should be very little potential for regression.  In fact, this
  should fix machines affected by lp87029, including OEM systems.
+ 
+ This has been tested using the following PPA:
+ 
+   https://launchpad.net/~ayan/+archive/acpi-support-sru
  
  
  
  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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-03-24 Thread Axel Beckert
Meh, now this pulls in consolekit on lightweight or non-X Debian
installations, too.

Can't the consolekit usage be made optional?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-03-03 Thread Launchpad Bug Tracker
This bug was fixed in the package acpi-support - 0.139

---
acpi-support (0.139) precise; urgency=low

  * lib/power-funcs: adjust getXuser and getXconsole to use consolekit
instead of ps/who to identify the foreground session and the owner
of a given X session, since lightdm is currently failing to record this
information in utmp.  Also, add headers for each of these functions
documenting how they're supposed to work, since it's completely
non-obvious and some of the scripts already in acpi-support are using
them wrong.  Thanks to Ayan George ayan.geo...@canonical.com for the
preliminary patch.  LP: #933626, #893271.
  * rotatescreen.sh: fix wrong use of getXconsole where getXuser is needed.
 -- Steve Langasek steve.langa...@ubuntu.com   Sat, 03 Mar 2012 15:49:47 -0800

** Changed in: acpi-support (Ubuntu)
   Status: In Progress = Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-03-02 Thread Launchpad Bug Tracker
** Branch linked: lp:acpi-support

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-03-02 Thread Steve Langasek
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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-02-24 Thread Ayan George
** Changed in: acpi-support (Ubuntu)
 Assignee: (unassigned) = Steve Langasek (vorlon)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-02-16 Thread Ayan George
** Patch added: power-funcs.diff
   
https://bugs.launchpad.net/bugs/933626/+attachment/2745858/+files/power-funcs.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 933626] Re: acpi-support should use ck-list-sessions to determine active X display and X user

2012-02-16 Thread Ubuntu Foundation's Bug Bot
The attachment power-funcs.diff of this bug report has been identified
as being a patch.  The ubuntu-reviewers team has been subscribed to the
bug report so that they can review the patch.  In the event that this is
in fact not a patch you can resolve this situation by removing the tag
'patch' from the bug report and editing the attachment so that it is not
flagged as a patch.  Additionally, if you are member of the ubuntu-
reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by
Brian Murray.  Please contact him regarding any issues with the action
taken in this bug report.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/933626

Title:
  acpi-support should use ck-list-sessions to determine active X display
  and X user

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/933626/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs