RequestReboot() causes dialog to appear briefly

Bug #391559 reported by Colin Watson
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
New
Low
Unassigned

Bug Description

Binary package hint: gnome-session

I recently converted ubiquity to use a D-Bus call to gnome-session rather than the previous excessively hacky C code to provoke a reboot. For reference, the relevant code is shown here:

  http://bazaar.launchpad.net/~ubuntu-installer/ubiquity/trunk/revision/3287#ubiquity/frontend/gtk_ui.py

This works fine, except that if you watch closely you can see a dialog appearing briefly before it disappears again and the session exits. Could this be changed to avoid the dialog being shown when the reboot isn't interactive?

ProblemType: Bug
Architecture: i386
Date: Wed Jun 24 12:19:49 2009
DistroRelease: Ubuntu 9.10
Package: gnome-session 2.26.1-1ubuntu1
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.30-9.10-generic
SourcePackage: gnome-session
Uname: Linux 2.6.30-9-generic i686

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote : Re: [Bug 391559] Re: RequestReboot() causes dialog to appear briefly

Is this the inhibit dialog which appears? RequestReboot() is non-interactive
in the sense that it bypasses the session dialog, but still triggers all the
usual session teardown stuff (asking clients if it is ok to shutdown, to
give them a chance to block etc), so you may still see an inhibit dialog,
and some clients may ask if you want to save work. This is the intended
behavior, but I suppose the DBus API could be expanded to provide a truly
non-interactive option which just stops the session. However, that can
already be achieved by calling Stop() on consolekit.

It might be worth working out which client inhibits though, so that can be
fixed instead.

On Jun 24, 2009 1:05 PM, "Colin Watson" <email address hidden> wrote:

** Attachment added: "Dependencies.txt"
  http://launchpadlibrarian.net/28277290/Dependencies.txt

-- RequestReboot() causes dialog to appear briefly
https://bugs.launchpad.net/bugs/391559 You rece...

Changed in gnome-session (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 391559] Re: RequestReboot() causes dialog to appear briefly

On Wed, Jun 24, 2009 at 12:18:03PM -0000, Chris Coulson wrote:
> Is this the inhibit dialog which appears? RequestReboot() is non-interactive
> in the sense that it bypasses the session dialog, but still triggers all the
> usual session teardown stuff (asking clients if it is ok to shutdown, to
> give them a chance to block etc), so you may still see an inhibit dialog,
> and some clients may ask if you want to save work.

I can't quite see because it disappears too quickly (I don't think it
finishes rendering), but I would be surprised if there are any active
inhibiting clients - I saw this on a clean live CD desktop.

> This is the intended behavior, but I suppose the DBus API could be
> expanded to provide a truly non-interactive option which just stops
> the session. However, that can already be achieved by calling Stop()
> on consolekit.

I do actually need to trigger a reboot, though (just 'reboot' isn't
enough because that doesn't tend to shut down very cleanly). Stop()
won't do that, will it?

> It might be worth working out which client inhibits though, so that can be
> fixed instead.

GetInhibitors() appears to return an empty array, unless I'm doing
something wrong.

  import dbus
  s = dbus.Bus.get_session()
  m = s.get_object('org.gnome.SessionManager', '/org/gnome/SessionManager')
  m.GetInhibitors()

Unless the installer is inhibiting the session manager itself, of
course; but it doesn't do so explicitly as far as I know.

Revision history for this message
Leo Arias (elopio) wrote :

Hello Colin,

Is this problem still present?

Revision history for this message
Colin Watson (cjwatson) wrote :

On Fri, Sep 03, 2010 at 04:58:26PM -0000, Leo Arias wrote:
> Is this problem still present?

There's code linked from the bug description. It should be easy for a
developer to just try it out - it doesn't need special hardware or
anything, although it might be best to try it in a live session. Bugs
should only need reverification by the reporter in the case where it's
hard for somebody else to reproduce them.

Leo Arias (elopio)
Changed in gnome-session (Ubuntu):
status: Incomplete → New
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.