[SRU] UBUNTU_MENUPROXY should not be set in Xfce

Bug #1307657 reported by Alistair Buxton
94
This bug affects 25 people
Affects Status Importance Assigned to Milestone
unity-gtk-module (Ubuntu)
Fix Released
Undecided
William Hua
Trusty
Fix Released
Undecided
William Hua
Utopic
Fix Released
Undecided
William Hua
xfce4-indicator-plugin (Ubuntu)
Invalid
Undecided
Unassigned
Trusty
Invalid
Undecided
Unassigned
Utopic
Invalid
Undecided
Unassigned

Bug Description

[Impact]

The upstart script for unity-gtk-module causes it to run under all desktop environments indiscriminately when it should only be running under Unity. It does this by adding unity-gtk-module to the environment variable GTK_MODULES.

In Xfce, this causes the panel to crash when trying to add Unity indicators, as well as other related side effects (see: LP: #1314782, LP: #1347272).

The fix to ensure we only modify GTK_MODULES under Unity is already in 14.10.

[Test Case]

Log into a Xubuntu session on a machine that has both ubuntu-desktop and xubuntu-desktop. Add the Indicator Plugin to the panel and open a terminal window. A crash dialog should appear notifying the user that the Indicator Plugin unexpectedly left the panel.

[Regression Potential]

The potential for regression is low since the only change is to preserve the original value of the GTK_MODULES environment variable, as well as to never set UBUNTU_MENUPROXY. The fix restores the desktop environment to its intended state of not running unity-gtk-module. Also, I've tested the change under Unity, and application menus still work properly under the global menu without regression.

[Other Info]

N/A

=== original bug report ===

To reproduce: either start with a fresh Ubuntu install and then install xubuntu-desktop, or start with Xubuntu and then install ubuntu-desktop - ie have both Xfce and Unity installed on the same machine.

Xfce now has support for gtk3 indicators launched by upstart, but indicator-appmenu is totally broken - it will constantly crash the panel and applications. Xfce has a mechanism to hide indicators, and then the frontend UI will not be loaded in the panel, but it seems that UBUNTU_MENUPROXY is still being set in Xfce, which causes menus to disappear from applications, even though nothing is available to receive them.

I discussed this with tedg and he suggested that the problem may be to do with the upstart service which sets UBUNTU_MENUPROXY, ie /usr/share/upstart/sessions/unity-gtk-module.conf

We may in future get the appmenus working in Xfce, and then we would need some way to turn the menuproxy on and off depending on the user configuration. But for now, since they are broken anyway, it would be easiest to simply blacklist xubuntu desktop completely.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: unity-gtk-module-common 0.0.0+14.04.20140403-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-8.28-generic 3.13.2
Uname: Linux 3.13.0-8-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon Apr 14 19:40:36 2014
InstallationDate: Installed on 2014-02-11 (61 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140210)
PackageArchitecture: all
SourcePackage: unity-gtk-module
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity-gtk-module (Ubuntu):
status: New → Confirmed
Revision history for this message
Ted Gould (ted) wrote :

I think for a quick fix we could just put a pre-start script in that checked to see if the desktop was Unity. Longer term it should check a dconf key (and run if that key is changed with the upstart-dconf bridge).

Changed in unity-gtk-module (Ubuntu):
assignee: nobody → William Hua (attente)
Revision history for this message
William Hua (attente) wrote :

Thanks Ted, merge proposed what you suggested for the short-term.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4-indicator-plugin (Ubuntu):
status: New → Confirmed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Another side effect of this is https://bugs.launchpad.net/ubuntu/+source/xfce4-volumed/+bug/1314782

Basically, the ubuntu extra gtk modules open dbus connections which become invalid if the application forks after calling gtk_init() - which is not supported, but something that you can usually get away with.

Revision history for this message
B_a_C (bryncoles-lancs) wrote :

To add, I am using Xububtu 14:4 (upgraded from 13:10), and am not using unity. What impact would blacklisting Xubunt-desktop have on me?

Also, if you need any other information, just let me know!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-gtk-module - 0.0.0+14.10.20140716-0ubuntu1

---------------
unity-gtk-module (0.0.0+14.10.20140716-0ubuntu1) utopic; urgency=low

  [ William Hua ]
  * Make up a bad state name if we can't infer a good name from a radio
    menu item's label or action. (LP: #1313184)
  * Forward show and hide signals to GTK+ menus. (LP: #1208019)
  * Disable unity-gtk-module on non-Unity desktops. (LP: #1307657)
 -- Ubuntu daily release <email address hidden> Wed, 16 Jul 2014 16:45:42 +0000

Changed in unity-gtk-module (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
bmaupin (bmaupin) wrote :

So the fix is for Xubuntu 14.10, but what about 14.04? Would this do the trick?

echo "
unset UBUNTU_MENUPROXY" >> ~/.bashrc

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This probably shouldn't be a duplicate of the fork-before-gtk_init bug, as it's only tangentally related - it merely exposes that other bug and requires a separate fix. This one also probably has other unrelated consequences too.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

@bmaupin yes, that would probably do the trick, but it would break Unity if you subsequently log in to that desktop.

Changed in xfce4-indicator-plugin (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
mikhail-777 (wpr-oxym) wrote :

So, when this bug will be fixed in Ubuntu 14.04 LTS ?

Stefan Tauner (stefanct)
Changed in unity-gtk-module (Ubuntu Trusty):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xfce4-indicator-plugin (Ubuntu Trusty):
status: New → Confirmed
William Hua (attente)
summary: - UBUNTU_MENUPROXY should not be set in Xfce
+ [FFE] UBUNTU_MENUPROXY should not be set in Xfce
summary: - [FFE] UBUNTU_MENUPROXY should not be set in Xfce
+ [SRU] UBUNTU_MENUPROXY should not be set in Xfce
Changed in unity-gtk-module (Ubuntu Trusty):
assignee: nobody → William Hua (attente)
William Hua (attente)
description: updated
William Hua (attente)
Changed in unity-gtk-module (Ubuntu Trusty):
status: Confirmed → In Progress
Changed in xfce4-indicator-plugin (Ubuntu Trusty):
status: Confirmed → Invalid
Revision history for this message
Iain Lane (laney) wrote :

Should be uploaded to trusty queue now

Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Alistair, or anyone else affected,

Accepted unity-gtk-module into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity-gtk-module/0.0.0+14.04.20141212-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed 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 https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity-gtk-module (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
William Hua (attente) wrote :

Tested in a Trusty VM under both Unity and Xfce, works for me.

Revision history for this message
William Hua (attente) wrote :

Package version is 0.0.0+14.04.20141212-0ubuntu1.

unity-gtk-module-common:
  Installed: 0.0.0+14.04.20141212-0ubuntu1
  Candidate: 0.0.0+14.04.20141212-0ubuntu1
  Version table:
 *** 0.0.0+14.04.20141212-0ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.0.0+14.04.20140403-0ubuntu2 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     0.0.0+14.04.20140403-0ubuntu1 0
        500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-gtk-module - 0.0.0+14.04.20141212-0ubuntu1

---------------
unity-gtk-module (0.0.0+14.04.20141212-0ubuntu1) trusty; urgency=low

  [ William Hua ]
  * Disable unity-gtk-module on non-Unity desktops. (LP: #1307657)
 -- Ubuntu daily release <email address hidden> Fri, 12 Dec 2014 16:38:08 +0000

Changed in unity-gtk-module (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for unity-gtk-module 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.

Revision history for this message
Lester Carballo Pérez (lestcape) wrote :

We have not a chance to make the global menu really configurable per sessions?

If we don't have UBUNTU_MENUPROXY in our environment also could be problematic. For example, if i'm outside of unity and i want to use the unity-gtk-module in a third-party global menu implementation.

I will need to set UBUNTU_MENUPROXY=0 for all root sessions, not matter if was launched with pkexec or gksudo or sudo, because root application have not access to the com.canonical.AppMenu.Registrar.

Then the only solution will be to set UBUNTU_MENUPROXY=0 in etc/environment and then probably in /etc/profile i will need to set it to 1 again, but of course this will have some side effect in other sessions.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.