Since revision 446.1.3, Zenity backend is broken

Bug #1363630 reported by Dmitry Shachnev on 2014-08-31
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME Flashback
indicator-session (Ubuntu)
Dmitry Shachnev
Dmitry Shachnev

Bug Description

Currently the code in zenity_question() looks like:

if (!g_spawn_check_exit_status (exit_status, &error))
      confirmed = TRUE;
      confirmed = exit_status == 0;

However !g_spawn_check_exit_status() call is mostly equivalent to "exit_status != 0". Thus, confirmed will be *always* set to TRUE, even if the user cancelled the dialog.

I have prepared a branch to fix this.

== Impact ==
The Cancel buttons in shutdown/end session dialogs are not working, and do the same as "OK" buttons. This may lead to data loss due to unsaved documents/etc.

== Test Case ==
* Log in to GNOME Flashback session.
* Select "Shutdown" from indicator-session menu.
* In the popped up dialog select "Cancel".

Expected result: the dialog will close, the machine won't shut down.

== Development / Stable Fix ==
Please see the attached branches.

== Regression Potential ==
The fix is part of 14.10 release and was confirmed to work fine. So no regression potential.

Related branches

tags: added: utopic
Changed in ubuntu-flashback:
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-session - 12.10.5+14.10.20140919-0ubuntu1

indicator-session (12.10.5+14.10.20140919-0ubuntu1) utopic; urgency=low

  [ Dmitry Shachnev ]
  * Make Cancel button in Zenity backend work again (LP: #1363630)
 -- Ubuntu daily release <email address hidden> Fri, 19 Sep 2014 13:48:47 +0000

Changed in indicator-session (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-gnome-flashback:
status: New → Fix Released
ileppala (iivari-leppala) wrote :

This bug still affects me, I've updated the latest packages and indicator-session is at the version:

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in indicator-session (Ubuntu Trusty):
status: New → Confirmed
Thomas Mayer (thomas303) wrote :

I can reproduce this bug using gnome-flashback-compiz on up-to-date ubuntu 14.04.2, kernel 3.16.0-31 (latest hwe)

Changed in indicator-session (Ubuntu Trusty):
assignee: nobody → Dmitry Shachnev (mitya57)
importance: Undecided → High
status: Confirmed → In Progress
description: updated

Hello Dmitry, or anyone else affected,

Accepted indicator-session into trusty-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in indicator-session (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Erick Brunzell (lbsolost) wrote :

@ Dmitry Shachnev,

I performed verification testing and all is fine with one minor caveat. An initial restart is required before the change takes effect, so should we add a "System restart required" warning after 'indicator-session' upgrades?

Otherwise all is fine, and I also cross-tested with the shutdown and restart buttons displayed by the main menu button.

So other than the above mentioned caveat this could be marked verification-done.

Works for me on Ubuntu 14.04 i386.
It allows me to cancel Shutdown, Reboot and Close session.
FYI, close the session then log in allows this change to take effect.

tadiv (tadiv-comcast) wrote :

OK - so I was able to add the proposed item to my .list file, but 1) the sudo apt-get upgrade -s listed a boatload of items (so I guess there is an issue with the /etc/apt/preferences.d/proposed-updates file I created and 2) even if that file was correct, I'm clueless as to how to install this patch to test it... A little help, please...


Mathew Hodson (mathew-hodson) wrote :

Run 'sudo apt-get install indicator-session' to update only the indicator-session package.

tadiv (tadiv-comcast) wrote :

Thank you! Interestingly, the response is that I already have that package installed...

tadiv@tadiv-desktop:~$ sudo apt-get install indicator-session
[sudo] password for tadiv:
Reading package lists... Done
Building dependency tree
Reading state information... Done
indicator-session is already the newest version.
The following packages were automatically installed and are no longer required:
  gir1.2-nautilus-3.0 linux-image-generic python-nautilus
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.

tadiv (tadiv-comcast) wrote :

The fix is either not actually installed, or it is not working for me.

Post output of (from terminal):
apt-cache policy indicator-session

Erick Brunzell (lbsolost) wrote :

@ Alberts, did you read my comment #6? An initial reboot is required after upgrading 'indicator-session'. I got no "restart required" notification but that may be because I was using the terminal, eg;

Step #1: Enable proposed

Step #2: run "apt-get update"

Step #3: run "apt-get install indicator-session"

Step #4: Disable proposed and run "apt-get update" again to prevent unwanted updates from proposed.

Step #5 : Resume testing and you'll discover that an initial reboot is required for the change to take effect. After that initial reboot all restart, shutdown, logout, and cancel buttons work as they should.

The only reason I didn't give this a verification-done nod is because I was unsure if "Restart required (restart_now_or_later)" needs to be added to this update. As I said, it's also possible that if updated using the update-manager such warning would be given ................. I'm not tech savvy enough to know how the "restart required" notifications are handled when appropriate.

tadiv (tadiv-comcast) wrote :

As requested:

  Installed: 12.10.5+14.04.20140925-0ubuntu1
  Candidate: 12.10.5+14.04.20140925-0ubuntu1
  Version table:
     12.10.5+14.04.20150404-0ubuntu1 0
        400 trusty-proposed/main i386 Packages
 *** 12.10.5+14.04.20140925-0ubuntu1 0
        500 trusty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     12.10.5+14.04.20140410-0ubuntu1 0
        500 trusty/main i386 Packages


@tadiv You need to upgrade indicator-session. You have 12.10.5+14.04.20140925-0ubuntu1 version, but fix is in 12.10.5+14.04.20150404-0ubuntu1

@Erik I don't know anything about restart required dialogs. If package has fixed problem than i think you can just mark it as verification-done.

@tadiv Try to install/upgrade with this command:
sudo apt-get install indicator-session=12.10.5+14.04.20150404-0ubuntu1

tadiv (tadiv-comcast) wrote :

I deleted the file and re-ran the previous install command and now I have:

tadiv@tadiv-desktop:~$ apt-cache policy indicator-session
  Installed: 12.10.5+14.04.20150404-0ubuntu1
  Candidate: 12.10.5+14.04.20150404-0ubuntu1
  Version table:
 *** 12.10.5+14.04.20150404-0ubuntu1 0
        500 trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     12.10.5+14.04.20140925-0ubuntu1 0
        500 trusty-updates/main i386 Packages
     12.10.5+14.04.20140410-0ubuntu1 0
        500 trusty/main i386 Packages

I'll test in a minute and reply as to success or not...


tadiv (tadiv-comcast) wrote :

Sorry - the file I deleted before retrying the install was the /etc/apt/preferences.d/proposed-updates file. The install I used was
sudo apt-get install indicator-session


tadiv (tadiv-comcast) wrote :

Success! Thank you so much everyone. I can now select [Cancel] and that actually works (as opposed to being logged off).


tags: added: verification-done
removed: verification-needed
cpcbegin (cpcbegin) wrote :

I can reproduce this bug using gnome-flashback-compiz on up-to-date ubuntu 14.04.2 64 bit, Linux i7 3.13.0-49-generic (latest at this moment)

Guy Verrijdt (gverrijdt) wrote :

Installed the fix
works now
needed a reboot first

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-session - 12.10.5+14.04.20150404-0ubuntu1

indicator-session (12.10.5+14.04.20150404-0ubuntu1) trusty; urgency=medium

  [ Dmitry Shachnev ]
  * Make Cancel button in Zenity backend work again. (LP: #1363630)
 -- CI Train Bot <email address hidden> Sat, 04 Apr 2015 09:29:37 +0000

Changed in indicator-session (Ubuntu Trusty):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for indicator-session has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers