applications.menu file has been renamed to gnome-applications.menu but XDG_MENU_PREFIX is not set

Bug #1191290 reported by Matthieu Baerts
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hello,

Firstly, thank you for maintaining all these gnome packages!

The latest version of gnome-menus has renamed applications.menu file: https://bazaar.launchpad.net/~ubuntu-branches/ubuntu/saucy/gnome-menus/saucy/revision/136/debian/gnome-menus.maintscript

    gnome-menus.maintscript:
    - Clean up after rename from /etc/xdg/menus/applications.menu
       to /etc/xdg/menus/gnome-applications.menu

But this environment variable is not set: XDG_MENU_PREFIX:

    $ test -z "$XDG_MENU_PREFIX" && echo null || echo $XDG_MENU_PREFIX
    null
    $ echo $XDG_CURRENT_DESKTOP
    GNOME
    $ echo $DESKTOP_SESSION
    cairo-dock

Here is the standards: https://developer.gnome.org/menu-spec/ => "Desktop Menu Specification"

______
 Here are the files defined by this specification:

$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu

    This file contains the XML definition of the main application menu layout. The first file found in the search path should be used; other files are ignored. This implies that if the user has their own ${XDG_MENU_PREFIX}applications.menu, it replaces the system wide one. (Though the user's menu may explicitly merge the system wide one.)

    Systems that offer multiple desktop environments and that want to use distinct menu layouts in the different environments can use differently prefixed .menu files. In this case the $XDG_MENU_PREFIX environment variable must be set by the system to reflect the .menu file that is being used.

    For example if a system contains both the GNOME and the KDE desktop environments it can decide to use gnome-applications.menu as the menu layout in GNOME sessions and kde-applications.menu as the menu layout in KDE sessions. To correctly reflect this, it should set the $XDG_MENU_PREFIX environment variable to "gnome-" respectively "kde-".

    Implementations may chose to use .menu files with other names for tasks or menus other than the main application menu. Such usage is not covered by this specification.
______

According to this document, the $XDG_MENU_PREFIX environment variable should contain "gnome-"

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: gnome-menus 3.8.0-1ubuntu3
ProcVersionSignature: Ubuntu 3.9.0-6.13-generic 3.9.6
Uname: Linux 3.9.0-6-generic x86_64
ApportVersion: 2.10.2-0ubuntu1
Architecture: amd64
Date: Sat Jun 15 15:06:24 2013
InstallationDate: Installed on 2011-08-10 (674 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110803.1)
MarkForUpload: True
SourcePackage: gnome-menus
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Matthieu Baerts (matttbe) wrote :
Revision history for this message
Matthieu Baerts (matttbe) wrote :

(I just subscribe Jeremy to this bug report because the latest version of gnome-menus was modified by him. I hope it's not a problem for him!)

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Yes, we'll get XDG_MENU_PREFIX for the GNOME & Unity sessions when we update gnome-session to 3.8.

This isn't breaking anything though, right?

Revision history for this message
Matthieu Baerts (matttbe) wrote :

@Jeremy: thank you for this quick answer!

> This isn't breaking anything though, right?

It's not a problem for Cairo-Dock because if this file is not found [$XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu] the dock will check first with some prefix (gnome-, kde-, etc.) and then check if there is a file which ends with applications.menu.

It's just to avoid useless warnings ;)

But I don't know how other programs work. If they decide to only respect specifications, no menu will be found on a Gnome session.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I believe GNOME and Unity are working fine in Saucy from either an upgrade or a clean install. If there is a different desktop that has trouble with the rename, please file a bug.

Thanks for the patch but we'll fix this soon with gnome-session 3.8 (perhaps next week). Our packaging branch for gnome-session is at https://code.launchpad.net/~ubuntu-desktop/gnome-session/ubuntu

no longer affects: gnome-menus (Ubuntu)
Revision history for this message
Matthieu Baerts (matttbe) wrote :

> If there is a different desktop that has trouble with the rename, please file a bug.

It's just that this environment variable is used by a few applications: shell, panel and menu-editors.
I guess that most of them are designed for GNOME and then will also check if 'gnome-applications.menu' file is also available (alacarte does that but maybe not all of them: http://codesearch.debian.net/search?q=XDG_MENU_PREFIX ).

But on the other hand if you'll fix this soon, it's maybe not a problem to not have the applications menu or to edit it, it should impact a lot of people, it was just to prevent this problem ;)

Revision history for this message
Matthieu Baerts (matttbe) wrote :

PS: yes, I confirm that this bug is fixed with the version 3.8: https://git.gnome.org/browse/gnome-session/tree/gnome-session/main.c?id=3.8.2.1#n360

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

This bug was fixed in the package gnome-session - 3.8.2.1-1ubuntu2

---------------
gnome-session (3.8.2.1-1ubuntu2) saucy; urgency=low

  [ Tim Lunn ]
  * 22_support_autostart_delay.patch:
    - Refreshed and re-enabled

  [ Jeremy Bicha ]
  * Restore gnome-session.postinst, accidentally left out of previous
    upload
 -- Tim Lunn <email address hidden> Thu, 20 Jun 2013 11:31:00 +1000

Changed in gnome-session (Ubuntu):
status: New → Fix Released
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.