fix up usage of XDG_CURRENT_DESKTOP

Bug #1554878 reported by Tim Lunn
44
This bug affects 6 people
Affects Status Importance Assigned to Milestone
GLib
Expired
Medium
Python XDG App
Confirmed
Undecided
Unassigned
empathy (Ubuntu)
Fix Released
Medium
Unassigned
eog (Ubuntu)
Fix Released
Medium
Unassigned
gnome-control-center (Ubuntu)
Fix Released
Medium
Unassigned
indicator-bluetooth (Ubuntu)
Fix Released
Medium
Unassigned
nautilus (Ubuntu)
Fix Released
Medium
Unassigned
totem (Ubuntu)
Fix Released
Medium
Unassigned
unity-control-center (Ubuntu)
Fix Released
Medium
Unassigned
unity-settings-daemon (Ubuntu)
Fix Released
Medium
Unassigned
yelp (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Since being standardised XDG_CURRENT_DESKTOP supports specifying multiple Desktop Names seperated by a colon, however many of the patches in Ubuntu pre-date this change so don't correctly support the current format in some cases.

These days XDG_CURRENT_DESKTOP will look something like
Unity
GNOME (gnome-shell)
GNOME-Classic:GNOME (gnome-shell classic mode)
GNOME-Flashback:Unity (Flashback sesison, although upstream and debian use GNOME-Flashack:GNOME for this)

Many of the patches only check for == "Unity" or == "GNOME", so misbehave for the latter cases in the list above.

I suspect this will be more widespread than just nautilus, but fixing that would be a good start. Since most of this code is still Ubuntu specific (upstream mainly use XDG_CURRENT_DESKTOP for onlyShowIn etc), probably taking the last value in the string would get the desired result of Unity vs GNOME3 behaviour

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: nautilus 1:3.18.4.is.3.14.3-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-8.23-generic 4.4.2
Uname: Linux 4.4.0-8-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Wed Mar 9 15:04:36 2016
SourcePackage: nautilus
UpgradeStatus: Upgraded to xenial on 2015-11-28 (102 days ago)

Related branches

Revision history for this message
Tim Lunn (darkxst) wrote :
description: updated
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

GTK+: message-dialog-restore-traditional-look-on-unity.patch, unity_rbga_tooltips.patch.

Changed in unity-control-center (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in nautilus (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in gtk+ (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in glib:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I've made a bunch of MPs for unity-control-center that drops unnecessary checking of XDG_CURRENT_DESKTOP. That should show the few remaining changes (if any) that need fixing.

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

This bug was fixed in the package yelp - 3.18.1-1ubuntu3

---------------
yelp (3.18.1-1ubuntu3) xenial; urgency=medium

  * debian/patches/06_make_ubuntu_docs_default.patch:
    - Fix usage of XDG_CURRENT_DESKTOP (LP: #1554878)

 -- Robert Ancell <email address hidden> Thu, 10 Mar 2016 16:47:11 +1300

Changed in yelp (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eog - 3.18.2-1ubuntu1

---------------
eog (3.18.2-1ubuntu1) xenial; urgency=medium

  * debian/patches/0001-EogWindow-Correctly-check-the-value-of-XDG_CURRENT_D.patch:
  * debian/patches/0002-Show-traditional-title-bar-in-unity.patch:
    - Fix usage of XDG_CURRENT_DESKTOP (LP: #1554878)

 -- Robert Ancell <email address hidden> Thu, 10 Mar 2016 17:07:06 +1300

Changed in eog (Ubuntu):
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.18.2-1ubuntu5

---------------
gnome-control-center (1:3.18.2-1ubuntu5) xenial; urgency=medium

  * Drop wrapper that launched unity-control-center for Unity sessions,
    since its no longer installed anywhere except Ubuntu GNOME (LP: #1554878)
  * d/p/ubuntu-gnome-version.patch: Update logo version string to
    "ubuntu 16.04 LTS"

 -- Tim Lunn <email address hidden> Thu, 10 Mar 2016 15:06:51 +1100

Changed in gnome-control-center (Ubuntu):
status: New → Fix Released
Changed in gtk+ (Ubuntu):
status: Triaged → Fix Committed
Changed in totem (Ubuntu):
importance: Undecided → Medium
Changed in yelp (Ubuntu):
importance: Undecided → Medium
Changed in totem (Ubuntu):
status: New → In Progress
Changed in empathy (Ubuntu):
status: New → Triaged
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Medium
Changed in eog (Ubuntu):
importance: Undecided → Medium
Changed in empathy (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Tim Lunn (darkxst) wrote :

unity-settings-daemon also has a bunch of checks that can most likely be dropped.

Changed in totem (Ubuntu):
status: In Progress → Fix Committed
Changed in empathy (Ubuntu):
status: Triaged → In Progress
Changed in empathy (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package totem - 3.18.1-1ubuntu4

---------------
totem (3.18.1-1ubuntu4) xenial; urgency=medium

  * debian/patches/ubuntu-use-traditional-titlebars.patch:
    - Fix usage of XDG_CURRENT_DESKTOP (LP: #1554878)

 -- Robert Ancell <email address hidden> Thu, 10 Mar 2016 20:16:05 +1300

Changed in totem (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package empathy - 3.12.11-0ubuntu3

---------------
empathy (3.12.11-0ubuntu3) xenial; urgency=medium

  * debian/patches/ubuntu_launch_uoa_panel.patch:
    - Fix usage of XDG_CURRENT_DESKTOP (LP: #1554878)

 -- Robert Ancell <email address hidden> Thu, 10 Mar 2016 20:25:38 +1300

Changed in empathy (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity-settings-daemon (Ubuntu):
status: New → Confirmed
Changed in dropbox (Ubuntu):
status: New → Confirmed
Changed in pyxdg (Ubuntu):
status: New → Confirmed
Changed in syncthing-gtk (Ubuntu):
status: New → Confirmed
Changed in unity-settings-daemon (Ubuntu):
importance: Undecided → Medium
Changed in dropbox (Ubuntu):
importance: Undecided → Medium
Changed in pyxdg (Ubuntu):
importance: Undecided → Medium
no longer affects: syncthing-gtk (Ubuntu)
affects: gtk+ (Ubuntu) → ubuntu
Changed in python-xdgapp:
status: New → Confirmed
no longer affects: dropbox (Ubuntu)
no longer affects: ubuntu
Revision history for this message
Wei Tsui (ghostplant) wrote :

will this bug fixed before formal release of Ubuntu 16.04 LTS?

For nautilus 3.18.4.is.3.14.3:

--- nautilus-3.18.4.is.3.14.3.orig/src/nautilus-window.c
+++ nautilus-3.18.4.is.3.14.3/src/nautilus-window.c
@@ -1554,7 +1554,24 @@ nautilus_window_constructed (GObject *se

  window->details->toolbar = create_toolbar (window);
  desktop = g_getenv ("XDG_CURRENT_DESKTOP");
- if (desktop && strstr (desktop, "GNOME"))
+
+ gchar **desktop_names;
+ gboolean is_gnome;
+ int i;
+
+ is_gnome = FALSE;
+ if (desktop != NULL) {
+ desktop_names = g_strsplit (desktop, ":", 0);
+ for (i = 0; desktop_names[i]; ++i) {
+ if (!g_strcmp0 (desktop_names[i], "GNOME")) {
+ is_gnome = TRUE;
+ break;
+ }
+ }
+ g_strfreev (desktop_names);
+ }
+
+ if (is_gnome)
   gtk_window_set_titlebar (GTK_WINDOW (window), window->details->toolbar);
  else {
   gtk_container_add (GTK_CONTAINER (grid), window->details->toolbar);

Hope to get nautilus fixed soon.

Changed in indicator-bluetooth (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Changed in nautilus (Ubuntu):
status: Triaged → Fix Released
Changed in unity-settings-daemon (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Removing pyxdg as it doesn't make use of XDG_CURRENT_DESKTOP

Changed in unity-control-center (Ubuntu):
status: Triaged → Fix Committed
no longer affects: pyxdg (Ubuntu)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This is affecting Ubuntu 16.10 now as XDG_CURRENT_DESKTOP is now set to "Unity:Unity7" (e.g. bug 1629668)

Revision history for this message
Robert Ancell (robert-ancell) wrote :

gnome-session (3.20.2-1ubuntu6) yakkety; urgency=medium

  * Set DesktopNames back to Unity. There are many buggy components that don't
    know how to deal with XDG_CURRENT_DESKTOP having multiple values, and it's
    too close to the release to fix them all.

 -- Iain Lane <email address hidden> Mon, 03 Oct 2016 17:37:57 +0100

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

This bug was fixed in the package indicator-bluetooth - 0.0.6+16.10.20161003-0ubuntu1

---------------
indicator-bluetooth (0.0.6+16.10.20161003-0ubuntu1) yakkety; urgency=medium

  [ Robert Ancell ]
  * Correctly use XDG_CURRENT_DESKTOP (LP: #1554878)

 -- <email address hidden> (<email address hidden>) Mon, 03 Oct 2016 10:15:04 +0000

Changed in indicator-bluetooth (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-settings-daemon - 15.04.1+16.10.20161003-0ubuntu1

---------------
unity-settings-daemon (15.04.1+16.10.20161003-0ubuntu1) yakkety; urgency=medium

  [ Dmitry Shachnev ]
  * Upstart: Split XDG_CURRENT_DESKTOP properly and start only on Unity
    sessions

  [ Iain Lane ]
  * Check XDG_CURRENT_DESKTOP properly in the keyboard plugin (LP:
    #1554878)

 -- <email address hidden> (<email address hidden>) Mon, 03 Oct 2016 10:15:27 +0000

Changed in unity-settings-daemon (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-control-center - 15.04.0+16.10.20161003.1-0ubuntu1

---------------
unity-control-center (15.04.0+16.10.20161003.1-0ubuntu1) yakkety; urgency=medium

  [ Robert Ancell ]
  * Don't check if we're running under Unity - we only support Unity
    (LP: #1554878, #1629668)
  * Ubuntu only supports usernames with lowercase letters. (LP:
    #1600638)

  [ Sebastien Bacher ]
  * Revert the change from r12750 to include only graphical sessions.
    (LP: #1380364)

  [ <email address hidden> ]
  * Removed "when battery is critical" functionality from the power
    panel as this is now handled by Upower and these settings now do
    nothing. Fixes LP: #1599264 (LP: #1599264)

 -- <email address hidden> (<email address hidden>) Mon, 03 Oct 2016 11:19:09 +0000

Changed in unity-control-center (Ubuntu):
status: Fix Committed → Fix Released
Changed in glib:
status: Confirmed → Expired
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.