global menu disappear in digikam after first use

Bug #778418 reported by Romano Giannetti on 2011-05-06
This bug affects 14 people
Affects Status Importance Assigned to Milestone
appmenu-qt (Ubuntu)

Bug Description

Binary package hint: unity


I have my natty desktop set to use unity as per default, but my application of choose to edit photos is digiKam. The problem is that digiKam has a very strange interaction with the global menu.

When you start digiKam the album view is showed, and all is ok. If you select a photo and choose "edit" (F4) all is working as it should, global menu is here.
But if you exit from the editor, select another photo, and enters the editor again (f4) the menu is gone. Nor global, nor local. You have to restart digiKam to have it back.
Starting with "UBUNTU_MENUPROXY= digikam" does not change anything.
Starting with "APPMENU_DISPLAY_BOTH=1 digikam" makes the program usable again; I will attach a screenshot where the local menu is visible and the global is missing (albeit being the cursor on the right spot, and the name of the application has hid away correctly).

Here is the screenshot.

description: updated
Stefan Zeyen (stefan-zeyen) wrote :


same Problem here on two machines. I am also interestet in a fix.

Ted Gould (ted) on 2011-05-17
affects: unity → appmenu-qt
Tim Penhey (thumper) wrote :

I also see this with Quassel, Konsole and KMail, so I'm guessing it is any QT menu.

Aurélien Gâteau (agateau) wrote :

I can't reproduce it here. Could you try this?

- Install libdbusmenu-tools

- Start digiKam

- Open a gnome-terminal

- Run:
  /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-before.json
  Cursor should turn into a crosshair, click digiKam window

- Reproduce the bug

- Go back to the terminal and run:
  /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json
  Click on the menubar-less digiKam window

- Attach digikam-before.json and digikam-after.json to this bug report

Changed in appmenu-qt:
status: New → Incomplete

reproducible here. Note that the problem is in the "image editor window", and only the second time you pop it up.
Could do only half of your instruction, got an error the second time:

(0)pern:~/software/bugs/digikam% /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-before.json
(0)pern:~/software/bugs/digikam% /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json

** (dbusmenu-dumper:16577): WARNING **: Unable to call 'GetMenuForWindow' on registrar: GDBus.Error:com.canonical.AppMenu.Error: Window not found
ERROR: could not find a menu for the pointed window

Stefan Zeyen (stefan-zeyen) wrote :

here is the file digikam-before.json

digikam-after.json is an empty file.

by running: /usr/lib/libdbusmenu/dbusmenu-dumper > digikam-after.json

i got this output in the terminal:

** (dbusmenu-dumper:21026): WARNING **: Unable to call 'GetMenuForWindow' on registrar: GDBus.Error:com.canonical.AppMenu.Error: Window not found
ERROR: could not find a menu for the pointed window

Aurelien, do you need more info? the probem is easily reproduced here.

Omer Akram (om26er) on 2011-05-22
affects: unity (Ubuntu) → appmenu-qt (Ubuntu)
Aurélien Gâteau (agateau) wrote :

Thanks for the info, will try to reproduce again.

Changed in appmenu-qt:
status: Incomplete → New
stianst (stianst) wrote :

I've been having this problem as well. It seems like if both the main window and the editor are maximized the global menu doesn't disappear from the editor. If the editor is not maximized the global menu sometimes disappear straight away, and sometimes after opening/closing the editor a few times.

Another reason to advocate for global menu only for maximized windows --- see bug #794888

stianst (stianst) wrote :

My bad seems the editor menu disappears when maximized as well :(

Mark Baas (mark-baas123) wrote :

I am having the same issue in an application I am developing. Seems that switching (QMain)Windows causes the appmenu to get confused. I even tried rebuilding the menus after usually losing it, made no difference.

From the error the dbus-dumper gives, I assume that appmenu lost the window to which the menu belonged, so just as a workaround it would be very very usefull if you'd implement a method in appmenu-qt to force rebuild/associate of the menubar.

Stefan Zeyen (stefan-zeyen) wrote :

the Digikam editor is working when i turn off the global menu by starting digikam with


but this wastes place on the display.

Changed in appmenu-qt (Ubuntu):
status: New → Confirmed
Hamish Downer (mishd) wrote :

I have now upgraded to Ubuntu 11.10. If I don't set any environment variable then I get the behaviour originally mentioned - the menu bar for the editor appears only the first time the editor is launched. However if I set either APPMENU_DISPLAY_BOTH=1 or QT_X11_NO_NATIVE_MENUBAR=1 then the digikam editor *never* has a menu item.

So at this point the only way I've found to launch the editor twice with menus is to quit digikam entirely. Which given the long amount of time digikam takes to start up is rather annoying.

Hamish Downer (mishd) wrote :

Just checked and


still works as you would expect. So it is not the case that the option to display the menu in the window has been taken away.

Uf --- if this is confirmed, could be an upgrade show-stopper for me.

In another bug, Aaron Roydhouse suggested two different tricks to get rid of the global menu:
   Uninstall the global menus: sudo apt-get remove appmenu-gtk3 appmenu-gtk appmenu-qt
    Set an environment variable: UBUNTU_MENUPROXY=0

Maybe one of this works? Anyone from digiKam developers listening?

Stefan Zeyen (stefan-zeyen) wrote :


after updating to Ubuntu 11.10 the described behaviour vanished magically.
I'm using digikam with global menue and everything is working fine in the moment.

But i agree with Hamish Downer, that it is in the moment not possible to start digikam without global menu.

Stefan Zeyen (stefan-zeyen) wrote :


i think i'm getting crazy.
Since updating Ubuntu from 11.04to 11.10 working with digikam ist fine. Yesterday iwrote it in my post and today the menu in the image Editor vanished again. Starting digikam with APPMENU_DISPLAY_BOTH=1 digikam does not change anything. digikam starts with global menue and the menue in the Imageeditor vanished while working.

Stefan Zeyen (stefan-zeyen) wrote :

Hi all,

today i removed "appmenu-qt"
All applications based on qt will start now without lgobal menu.
All other apllications are starting with global menue furthermore.
Digikam is working now, but i rather like to have global menu.


I can confirm that the problem is still here in 11.10. Nasty.

In my case it seems that using "QT_X11_NO_NATIVE_MENUBAR=1 digikam" to start the app works --- not nice, but a workaround.

Maybe a duplicated or same-reason-bug of ?

Now I have switched to gnome-shell, and I have a similar problem: when editing a photo, the editor comes out without menu nor statusbar. If you press two times ctrl-m you have the menu back, and if you disable/enable the statusbar, it comes out. It is impossible to minimize the windows.
All seems fixed by tge "trick" of "QT_X11_NO_NATIVE_MENUBAR=1 digikam".
Anyone working on this? I know that Gnome is not the native desktop for digikam, but I think these glitches should be fixed...

Hmmm, no, the aforementioned trick does not reliably work. Sometime yes, sometime no. It has stopped working after I have changed digikam form a virtual desktop to another one. Could be related?

Aurélien Gâteau (agateau) wrote :

I think this bug is the same as . I have a PPA build fixing this: can any Precise user give a try to: ? If it works I can build an Oneiric version as well.

Aurélien Gâteau (agateau) wrote :

More info: if this bug is really the same as then it should only happen on Unity (not KDE) and only if you keep the editor window closed for more than 5 seconds.

Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien,

i'm intersted to test the fix, but i have only oneiric systems i368 and amd64.
If you can build an oneirc package i will test it.

It does look like the menu doesn't disappear if the editor window is closed less than 5 seconds

Aurélien Gâteau (agateau) wrote :

Package for Oneiric should start building in a few hours in the same PPA.

Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien,

your fix works fine on oneiric amd64.
I will test it tomorrow on i386


it works for me on oneiric i386, gnome shell. Thank you very much!
(BTW please tell on this bug report when we should "purge" the ppa and come back to the normal distro package! Thanks!)

Stefan Zeyen (stefan-zeyen) wrote :

Hi Aurelien

your patch ist working on oneiric i386 as well.
Do you wish some specila test?

Thank you for your work!

Hands up. Unfortunately the editing windows stopped again working for me, using gnome-shell. Toolbox disappears, and now even the right-hand toolbox has disappeared and I cannot see it again.

What happens is that the editor window is unable to exit from full-screen mode. If I select "exit full screen mode", the window flashes, than go back to full screen and menus disappears.
Maybe some interaction with unity compiz plugin, even if using gnome-shell? Will try and report.

Killed maximus, seems to work now.
Die maximus die.

Stefan Zeyen (stefan-zeyen) wrote :

i have no problems here using digikam with gnome-shell and i cant reproduce the bugs mentioned in comment #32 and #33, but i don't use maximus. Seems to be a problemt with maximus.

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

Other bug subscribers