2

I recently got a raspberry pi 2 B and downloaded and installed 2015-11-21-raspbian-jessie. It worked great until I tried to add a sub menu and item to the LXDE lxpanel Applications menu. I used the provided Preferences Main Menu Editor (alacarte). After doing so I clicked the Applications button in the panel and realized that all menu items except Preferences and Shutdown are gone.

I tried update-menus -v -d and it states it finds 63 applications, but none of them will show in Applications menu.

As I previously added one user I already realized that the applications menu is not filled with the default applications, but did not care further. Only the Preferences and Shutdown menu shows.

I'm unable to find any log or debug output that explains why there are no more menu items. The files (.desktop and .directory) are all existing as the .menu files.

  • 1
    I can't give you a definitive answer. Something similar happened to me some time ago. This was due to an error in one of the items that caused loading to stop. I resolved it by copying the menu and deleting items until I got display, then selectively restored one by one. – Milliways Jan 11 '16 at 6:31
  • I also have heard of this - and I wondered whether it is related to combining a shared system menu (provided to "all" users) and a personally configured "user" one. Perhaps the act of personalising a (new?) user one it loses the content from the shared one. It doesn't help that under some circumstances you get a warning that you are in "kiosk" mode and cannot edit the menus... – SlySven Jan 11 '16 at 13:26
0

After some compare with my Debian Jessie netbook and reading about xdg in general I compared raspbian and jessie (my netbook) exports:

Netbook Debian Jessie

>export -p|grep XDG
declare -x XDG_CONFIG_DIRS="/etc/xdg"
declare -x XDG_CONFIG_HOME="/home/hgode/.config"
declare -x XDG_CURRENT_DESKTOP="LXDE"
declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/"
declare -x XDG_GREETER_DATA_DIR="/var/lib/lightdm/data/hgode"
declare -x XDG_MENU_PREFIX="lxde-"
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SEAT="seat0"
declare -x XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0"
declare -x XDG_SESSION_ID="1"
declare -x XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session0"
declare -x XDG_VTNR="7"

raspbian:

$ export -p|grep XDG
declare -x XDG_RUNTIME_DIR="/run/user/1000"
declare -x XDG_SESSION_ID="c5"

Not that much.

Running update-menus -v -d on the raspbian says:

update-menus -v -d
update-menus[1313]: Update-menus is run by user.
update-menus[1313]: Dpkg is not locking dpkg status area, good.
update-menus[1313]: Reading installed packages list...
update-menus[1313]: Reading translation rules in /etc/menu-methods/translate_menus.
update-menus[1313]: Reading menu-entry files in /home/pi/.menu.
update-menus[1313]: 0 menu entries found (0 total).
update-menus[1313]: Reading menu-entry files in /etc/menu.
update-menus[1313]: 0 menu entries found (0 total).
update-menus[1313]: Reading menu-entry files in /usr/lib/menu.
update-menus[1313]: 0 menu entries found (0 total).
update-menus[1313]: Reading menu-entry files in /usr/share/menu.
update-menus[1313]: 64 menu entries found (64 total).
update-menus[1313]: Reading menu-entry files in /usr/share/menu/default.
update-menus[1313]: 0 menu entries found (64 total).
update-menus[1313]: Running menu-methods in /home/pi/.menu-methods.
update-menus[1313]: Running menu-methods in /etc/menu-methods.
update-menus[1313]: Running method: /etc/menu-methods/xdg-desktop-entry-spec-sessions
update-menus[1313]: Running method: /etc/menu-methods/menu-xdg
update-menus[1313]: Running method: /etc/menu-methods/xdg-desktop-entry-spec-apps
update-menus[1313]: Running method: /etc/menu-methods/openbox
update-menus[1313]: Running method: /etc/menu-methods/xdg-desktop-entry-spec-dirs

but there are no items listed in the applications menu except Preferences and Shutdown. Does update-meus use default dirs or the ones set with export XDG_...?

I renamed the existing .menu files in /home/pi/.config/menus/ to ".menu.bak" and re-run update-menus and the Applications menu was filled with the entries. Then there was also a new file "debian-menu.menu".

ls -l .config/menus/
total 32
-rw-r--r-- 1 pi pi 4964 Jan 10 18:10 applications.menu.bak
lrwxrwxrwx 1 pi pi   48 Jan 10 17:55 applications-merged -> /home/pi/.config/menus/lxde-pi-applications.menu
-rw-r--r-- 1 pi pi 4964 Jan 11 17:52 debian-menu.menu
-rw-r--r-- 1 pi pi 4964 Jan 11 17:44 debian-menu.menu.bak
-rw-r--r-- 1 pi pi 1067 Jan 10 19:15 lxde-pi-applications.menu.bak

So, XDG_CURRENT_DESKTOP seems to default to "debian". But a test with XDG_CURRENT_DESKTOP="LXDE-PI" did not create a new lxde-pi-applications.menu file.

Still curious about how xdg builds the menu. But I am now OK with having back the debian applications inside the Applications menu.

I can reproduce the issue by starting alacarte (Main Menu Editor) and adding a new sub and new menu item: the applications menu will be cleared (alacarte still showing all). Then there is a new lxde-pi-applications.menu file at .config/menus/. After deleting the file and running update-menus the applications menu is filled up again.

Edit2: BTW: using lxmed does work on adding a custom menu and item and the applications menu is not cleared.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.