Traditional menu broken in 11.4

The traditional menu is broken in 11.4.

Instead of a hierarchical menu:

Internet → web browsers → Firefox
konqueror

→ Email → thunderbird
kmail

Now everything is grouped on a first level menu, email clients in the same
group as web browsers, all under “Internet” together and mixed. And less
entries.

This takes out the usability of the menu.

I have opened a Bugzilla about this, but they want to close it without
repairing the problem. Please complain and vote there.

> https://bugzilla.novell.com/show_bug.cgi?id=692466


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Hi,
I don’t use the default menus. But IMHO it’s easy to fix. You can see that the categories are still in the distro desktop files:

grep -e 'WebBrowser;' -e 'Email;' /usr/share/applications/*

Now compare the files /etc/xdg/menus/applications.menu and /etc/xdg/menus/gnome-applications.menu. The categories you’re looking for are present in the first one. I believe your gnome is using the second one - meaning XDG_MENU_PREFIX might be set to “gnome-”. Either set XDG_MENU_PREFIX to an empty string in your xinitrc or Xsession file, or switch the menu files, or define your own XDG_CONFIG_DIRS, put your applications.menu there and do what you want.

On 2011-05-12 13:06, please try again wrote:
>
> Hi,
> I don’t use the default menus. But IMHO it’s easy to fix. You can see
> that the categories are still in the distro desktop files:
>
> Code:
> --------------------
> grep -e ‘WebBrowser;’ -e ‘Email;’ /usr/share/applications/*
> --------------------
>
>
> Now compare the files /etc/xdg/menus/applications.menu and
> /etc/xdg/menus/gnome-applications.menu. The categories you’re looking
> for are present in the first one. I believe your gnome is using the
> second one - meaning XDG_MENU_PREFIX might be set to “gnome-”. Either
> set XDG_MENU_PREFIX to an empty string in your xinitrc or Xsession file,
> or switch the menu files, or define your own XDG_CONFIG_DIRS, put your
> applications.menu there and do what you want.

That’s interesting. Yes indeed, this “XDG_MENU_PREFIX=gnome-” is in the
environment.

I copied ~/.xinitrc.template to ~/.xinitrc, and added the line

XDG_MENU_PREFIX=

there, restarted gnome, no good. Then I tried:

unset XDG_MENU_PREFIX

Restarted, no good. I then created .Xsession with that single line, no
good. The variable inside the gnome session is still “gnome-”, so the line
is not modified from those files. The files I edited must be read before
the variable is set, or they are not read.

Any other place to put that line so that it is read?


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

It depends on how you start X.

BTW, it should be

XDG_MENU_PREFIX=""

Unsetting the variable might just bring the default back.

I am still seeing the traditional menu.

However — after using XFCE for a while, I reverted to KDE and the launcher menu that I saw was the XFCE menu.

There’s apparently some information leakage between desktops.

The KDE menu problem cleared up by itself on my home system. But on my office system, the XFCE menu persisted. So here’s what I did:

1: logout from KDE
2: CTRL-ALT-F1 - to get a terminal login.
3: In that terminal session, I did the following:
4: cd /var/tmp
5: rm -rf kdecache-user ## where “user” was my login name
6: logout
7: CTRL-ALT-F7 – to get a GUI login screen
8: Login to KDE. The menu was back to normal.

In short, it looks as if the cached data can become corrupted. Deleting the cached data while not logged in forces it to be regenerated.

I’m not sure if that will solve your problem, but it is worth a try. (And if it does fix the problem, you could add a comment to the bug report).

It should be ~/.xsession actually. But /etc/gdm/Xsession sources a bunch of files. So you should make sure that the variable doesn’t get redefined somewhere else.

  • assuming you’re using gdm.

On 2011-05-12 15:36, please try again wrote:
>
> robin_listas;2338735 Wrote:
>>
>>
>> Any other place to put that line so that it is read?
>>
>
> It depends on how you start X.

Runlevel 5, gdm login manager.

> BTW, it should be
>
> Code:
> --------------------
> XDG_MENU_PREFIX=""
> --------------------
>
>
> Unsetting the variable might just bring the default back.

Wrote that to .Xsession and .xinitrc. XDG_MENU_PREFIX is stil “gnome-”
inside the session after restarted :-/

Then I wrote «XDG_MENU_PREFIX=“boo”» - it is stil “gnome-” inside the
session after restarted :-//

I don’t understand.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-12 15:36, nrickert wrote:
> 1: logout from KDE

I’m using gnome.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Stupid question: Do you also export this variable? Ok, sorry. It was a stupid question.

On 2011-05-12 16:06, please try again wrote:
>
> robin_listas;2338735 Wrote:
>>
>> Restarted, no good. I then created .Xsession with that single line, no
>> good.
>
> It should be ~/.xsession actually. But /etc/gdm/Xsession sources a
> bunch of files. So you should make sure that the variable doesn’t get
> redefined somewhere else.
>
> * assuming you’re using gdm.

I have edited /usr/bin/gnome, the variable is set there. And it works!

I found it by a brute force grep of the entire installation O:-)

AHHHHhhhhh! :slight_smile:

(what a relief…)


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I don’t know where/why XDG_MENU_PREFIX is set to “gnome-” on your system. I can not tell because I use my own /etc/gdm/Xsession (but I don’t see it in the original file either). You can have a look in this file and in the other files it sources on its way to the gnome session. I use XDG_MENU_PREFIX in my /etc/gdm/Xsession for KDE sessions only (setting the prefix to kde4-) and XDG_CONFIG_DIRS to /usr/local/config/xdg, so it will look for <prefix->applications.menu in /usr/local/config/xdg/menus before it looks in /etc/xdg/menus. In all other cases, XDG_MENU_PREFIX is empty (for me), so I use applications.menu.

  • With XDG_MENU_PREFIX, you have influence on the menu name (applications.menu, gnome-, kde-, xfce-, -lxde or whatever you set in the environment)
  • With XDG_CONFIG_DIRS, you can change the location of the menu file.
  • With XDG_DATA_DIRS, you can choose the location of the .desktop and .directories files.

Read the freedesktop specs for details: Desktop Menu Specification

Sorry, I didn’t see your post. Well done! You got it. I can explain why it isn’t set for me: simply because I set XDG_CONFIG_DIRS in /etc/gdm/Xsession, as I mentioned above, and there is no gnome-applications.menu file in the first directory listed in this variable, but I have applications.menu, so it should take this one… and maybe unset the variable afterwards (?).

I told you it would be easy to fix. :wink:

On 2011-05-12 17:06, please try again wrote:

> I told you it would be easy to fix. :wink:

Systemwide, changing the calling script, where it might be replaced by an
update. Not the perfect place.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-12 17:06, please try again wrote:
>
> I don’t know where/why XDG_MENU_PREFIX is set to “gnome-” on your
> system.

Ah, I said that in another post, where I wrote the solution: /usr/bin/gnome.


# Use gnome-applications.menu instead of applications.menu: its
# structure is more appropriate.
export XDG_MENU_PREFIX=gnome-

I’ll save the rest of your post for reference :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-12 16:36, please try again wrote:
>
> Stupid question: Do you also export this variable? Ok, sorry. It was a
> stupid question.

No, not stupid. I tried with export, too. No good.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

On 2011-05-12 17:06, please try again wrote:
>
> Sorry, I didn’t see your post. Well done! You got it. I can explain why
> it isn’t set for me: simply because I set XDG_CONFIG_DIRS in
> /etc/gdm/Xsession, as I mentioned above, and there is no
> gnome-applications.menu file in the first directory listed in this
> variable, but I have applications.menu, so it should take this one…
> and maybe unset the variable afterwards (?).

I’ll have to start a file with the modifications I have to do to the 11.4
version, bugs discovered, hacks needed…

Next thing to test: vmware server. It doesn’t look good, so I’m delaying it.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)