indicator-appmenu leads to have a nautilus menubar displayed on top of the screen

Bug #826771 reported by Wildjiji on 2011-08-15
This bug affects 53 people
Affects Status Importance Assigned to Milestone
Unity Foundations
Ted Gould
gtk+3.0 (Ubuntu)
nautilus (Ubuntu)
Ken VanDine

Bug Description

All non-Ubuntu session with Nautilus as the default file browser
(and if there is no other panels on top of the nautilus menu bar ; e.g. a Cairo-Dock session ; a Gnome-Shell or Gnome-Classic session with a transparent top bar ; a Cinamon session, a XFCE session with nautilus as default file browser, etc.)

[Development Fix]
(we don't need to backport any application, simply apply the debdiff proposed on comment #48)

[Stable Fix]
A patch has been proposed and tested: (and after)
A few information about this patch: if appmenu-gtk3 is installed, gtk_widget_hide function doesn't work for the top menubar (bug fixed on Precise). With this patch, menubar's widget is not created for the desktop nautilus window on non-ubuntu session.

[Text Case]
1. Install gnome-shell and gnome-themes-standard
2. login gnome session
3. Apply gnome shell theme of using transparently panel.
(ex. Delta-shell: )
1. Install Cairo-Dock
2. login Cairo-Dock session

[Regression Potential]
This patch seems to fix the bug #912379 caused by the previous patch (reverted in this version: 3.2.1-0ubuntu4.1).
This menubar is not modified after because it's no longer registered to updates menu signals.

[Original Report]
If a transparently panel is used in gnome shell theme, nautilus menu bar is visible under the gnome shell panel.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: nautilus 1:3.1.4-0ubuntu3
ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
Uname: Linux 3.0.0-8-generic i686
Architecture: i386
Date: Mon Aug 15 22:10:54 2011
ExecutablePath: /usr/bin/nautilus
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110531.1)
 PATH=(custom, user)
SourcePackage: nautilus
UpgradeStatus: Upgraded to oneiric on 2011-08-13 (2 days ago)

Related branches

Wildjiji (wildjiji) wrote :
Pedro Villavicencio (pedro) wrote :

That's an upstream bug, it has been filed here:

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in nautilus:
importance: Unknown → Undecided
status: Unknown → New

The upstream bug has been closed. They've said this bug is caused by the patched nautilus in ubuntu.

affects: nautilus (Ubuntu Oneiric) → indicator-appmenu (Ubuntu Oneiric)
Changed in indicator-appmenu (Ubuntu Oneiric):
assignee: nobody → Canonical Desktop Experience Team (canonical-dx-team)
importance: Low → High
affects: nautilus → indicator-appmenu
summary: - Nautilus menu bar is visible under the transparently panel in gnome
- shell
+ indicator-appmenu leads to have a nautilus menubar displayed on top of
+ the screen

You should try unninstalling indicator-appmenu, it may work

The temporary solution I have found it's to disable the 'Have the filemanager handle the desktop' option. You can use gnome-tweak-tool to do that. The downside is that the desktop icons won't show anymore.

Wildjiji (wildjiji) wrote :

Thank you for information of the temporary solution.

Actually the permanent solution is to indeed remove indicator-appmenu. But you must also remove appmenu-gtk3 and appmenu-gtk. That will remove the global menu in unity but I guess is not much of a problem if you're using gnome-shell.

Wildjiji (wildjiji) wrote :

I don't want the way of removing indicator-appmenu. because I would like to use both unity (global menu is working) and gnome-shell.

Sebastien Bacher (seb128) wrote :

undupping from bug #805252, those are different issues

Ted Gould (ted) on 2011-09-06
affects: indicator-appmenu (Ubuntu Oneiric) → nautilus (Ubuntu Oneiric)
Changed in nautilus (Ubuntu Oneiric):
assignee: Canonical Desktop Experience Team (canonical-dx-team) → Ted Gould (ted)
affects: indicator-appmenu → unity-foundations
Changed in unity-foundations:
assignee: nobody → Ted Gould (ted)
milestone: none → oneiric-backlog
status: New → Triaged
importance: Undecided → High
tags: added: rls-mgr-o-tracking
Sebastien Bacher (seb128) wrote :

Ted, do you still think you will get to it for Oneiric?

chicken159 (services) wrote :

The same symptom (nautilus menu-bar visible behind top panel) is present with Unity when compizconfig settings manager is used to set the Unity Plugin panel Opacity to transparent.

In my case this is with indicator-appmenu removed to disable the global(paininthebutt)menu.

Dmitry Shachnev (mitya57) wrote :

Test case:

metacity --replace # Kill Unity
killall unity-panel-service # Let applications have menus

Nautilus menu will be visible in the top area of the screen.

dino99 (9d9) wrote :

get it with gnome-classic on i386

Sebastien Bacher (seb128) wrote :

Ted, can we get that fixed for Oneiric?

Matthieu Baerts (matttbe) wrote :


I also have this bug.

On the bug LP #805252 cimi has proposed a new version of this patch for GTK+3-0 which solved the bug for me: 043_ubuntu_menu_proxy.patch

Cimi has adde more details about it on comments #13 -> #16
Please have a look to it!

I guess I can link this bug to GTK+3-0.

Sebastien Bacher (seb128) wrote :

Cimi said that the issue is a nautilus one, not a gtk bug

Changed in gtk+3.0 (Ubuntu Oneiric):
status: New → Invalid
importance: Undecided → High
Dmitry Shachnev (mitya57) wrote :

User suggests a workaround:

@ src/nautilus-desktop-window.c, line 106

- gtk_widget_hide (NAUTILUS_WINDOW (window)->details->menubar);
+ gtk_widget_destroy (NAUTILUS_WINDOW (window)->details->menubar);

But after doing this, Nautilus menu isn't visible in Unity panel. Calling destroy() after ubuntu_menu_proxy_insert() also doesn't help.

I can't figure out why we see widget that was hidden (even 2 times), maybe something calls gtk_widget_show() after that?

Dmitry Shachnev (mitya57) wrote :

Ted, is it possible to detect if appmenu is active (maybe just check if process "unity-panel-service" exists)?

I want to do something like "if (appmenu) gtk_widget_destroy()".

Matthieu Baerts (matttbe) wrote :

I can confirm that this bug seems to be fixed with the version patched by Dmitry and available on the new branch linked to this bug report!
Thank you :)

PS: this version is currently waiting to build on my ppa if someone else want to test it.

Dmitry Shachnev (mitya57) wrote :

@Matthieu: thanks for the ppa! I'll now write a merge request.

Matthieu Baerts (matttbe) wrote :

@Dmitry, you're welcome! Thank you for the patch.

But I just have one question about this patch: why did you remove this menubar only on non ubuntu* sessions?
       + if (!g_str_has_prefix(g_getenv("DESKTOP_SESSION"), "ubuntu"))

Because it's also possible to disable the Unity Compiz plugin on an 'ubuntu' session and after that we will have this (ugly) menu on top of the desktop.

Dmitry Shachnev (mitya57) wrote :

@Matthieu: I can't do this without breaking Unity's desktop menu (it becomes not visible, too).

Hello Wildjiji, or anyone else affected,

Accepted nautilus into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Changed in nautilus (Ubuntu):
status: Triaged → Fix Committed
Changed in nautilus (Ubuntu Oneiric):
status: Triaged → Fix Committed
tags: added: verification-needed
Matthieu Baerts (matttbe) wrote :

@Dmitry: ok. I tought it was a bug for the Unity's desktop too... But this menu is still visible without Unity compiz plugin...

Adolfo Jayme (fitojb) wrote :

I can confirm that the top menu dissapeared with the proposed version of nautilus, fixing this bug.

tags: added: verification-done
removed: verification-needed
Bowmore (bowmore) wrote :

It did't disappear for the Unity shell, still there.

Dmitry Shachnev (mitya57) wrote :

@Bowmore: see my comment #22.

Bowmore (bowmore) wrote :

@Dmitry: Yes, but it's still an issue that needs to be solved for Unity as well.
Probably needs to be solved in appmenu-gtk/qt?

Wildjiji (wildjiji) wrote :

Thank you for fix. this fix is worked fine.

But, Is this fix code correct?
I applied attached patch to Nautilus and executed.
The results was Nautilus worked fine in ubuntu session.

I guess that gtk has bugs.
GTK_MENU_BAR widget not stop rendering global menu by gtk_widget_hide function.

Matthieu Baerts (matttbe) wrote :

> @Dmitry: Yes, but it's still an issue that needs to be solved for Unity as well.
If this line has been added on the code, I guess it's not a bug if we use an Unity session but it's maybe an error:
     ubuntu_menu_proxy_insert(proxy, GTK_WIDGET(window), NAUTILUS_WINDOW(window)->details->menubar, 0);

But I think we don't have to restrict to an Ubuntu session. Or maybe we can detect if "unity-panel-service" is launched? I think it's easier to use g_spawn_command_line_sync in order to launch this command:
   $ pgrep unity-panel-service
 (if (standard_output != NULL && *standard_output != '\0' && *standard_output != '\n'))

Dmitry Shachnev (mitya57) wrote :

What I did is just a workaround, but I don't think that many users use Unity with transparent panel and without AppMenu, so it's fixed for 90% of users.

Maybe it'll also be efficient to change "if (proxy != NULL)" check to "if (proxy != NULL && g_str_has_prefix(...))".

As I said in comment #17, the actual problem is not in Nautilus, but probably in appmenu-gtk.

Checking for unity-panel-service is not a good idea because Nautilus process can be launched before that one.

Britt Yazel (brittyboi) wrote :

I can confirm that in both Unity and in Gnome-Shell I still have this bug. I have had to turn off file manager handling the desktop, until this bug is fixed.

The real issue is not the fact that "with transparent themes it is viewable underneath", as that only affects a small portion of the population. The real issue is that in both Unity and Gnome shell it pushes the background image downwards by around 20-25 pixels. This affects the smoothness of when you log in, and also in gnome shell any time you go into and out of the 'activities window' the background image jumps up and down.

Another big problem is people with more than one monitor. In Unity it is fine because the unity bar is shared across both screens, but in Gnome-Shell the top bar is only on the main screen, leaving the ugly nautilus menu bar across the top of the screen of the other monitor.

The only fix as of now to fix the bar being there and subsequently moving the placement of the background image is to turn of file manager handling the desktop in Gnome-tweak....which works beautifully......but it is an unfortunate fix for those like me who enjoy having icons on their desktop

The fix needs to be one where we can have the file manager handle the desktop WITHOUT the bar being across the top, because it is for all intensive purposes useless.

Britt Yazel (brittyboi) wrote :

This is a picture showing the background image being pushed downwards, as well as having en empty blank spot on the second monitor (the same as on the main monitor but just hidden under the gnome-shell bar) where the file/edit/view/go/bookmarks/help menu is located.

This issue DOES affect ALL Unity users in the fact that it pushes the background image downwards. This makes logging into the desktop ugly in that the background image loads fine and then jerks downwards, as well as the annoyance in that background images will not be aligned the way you tell them to.

It is primarily focused on gnome-shell users (due to the jerky activities menu in relation to the background image), but also to all gnome-shell users with transparent themes and/or more than 1 monitor. Similarly, it effects everyone who likes smooth and nice looking logins as well as background images being aligned properly.

Britt Yazel (brittyboi) wrote :

Is it possible to have Nautilus handle the desktop, without turning it into an enlarged file manager?

What I mean is that is there a way for the desktop to have the ability to have icons and such without the menu bar at the top?

Matthieu Baerts (matttbe) wrote :

@brittyboi: A new version of nautilus is available into oneiric-proposed repository (please have a look to the comment #23 ) and Fitoschido has confirmed that it fixes this bug.
Do you use this version?

Britt Yazel (brittyboi) wrote :

It Works!!!

My mistake for adding to the report without noticing that there was a fix released. I didn't have the proposed repository enabled, but the fix did in fact work.

Thank you for the prompt response and for getting the fix out there!! You guys rock!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.2.1-0ubuntu2

nautilus (1:3.2.1-0ubuntu2) oneiric-proposed; urgency=low

  [ Dmitry Shachnev ]
  * debian/patches/05_desktop_menu_export.patch (updated):
    - Destroy menubar on non-ubuntu sessions (LP: #826771)
    - Remove duplicate lines (LP: #874847)
  * debian/patches/17_dont_allow_new_tab_on_desktop.patch:
    - Don't allow "New tab" shortcut on desktop (LP: #814799)

  [ Martin Pitt ]
  * 05_desktop_menu_export.patch: Fix potential crash if $DESKTOP_SESSION is
    not set.
 -- Dmitry Shachnev <email address hidden> Tue, 25 Oct 2011 12:46:53 +0200

Changed in nautilus (Ubuntu):
status: Fix Committed → Fix Released
Changed in nautilus (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Changed in unity-foundations:
status: Triaged → Fix Released
Sebastien Bacher (seb128) wrote :

the fix there creates bug #912379, spamming .xsession-errors with:
"Gtk-CRITICAL **: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed"

the bookmarks code seems to be trying to update the menus which is an issue with bar destroyed...

do you have any idea how to fix that? if not we should probably revert the fix until somebody comes with a better one...

Changed in nautilus (Ubuntu):
status: Fix Released → Triaged
Dmitry Shachnev (mitya57) wrote :

What I did is just a workaround, here is what I can suggest instead of destroying the widget (I didn't test any of these so I'm not sure it will work):

- insert menu to proxy only on "good" sessions, like that:
  if (proxy != NULL && (desktop_session == NULL || g_str_has_prefix(desktop_session, "ubuntu")) {
       ubuntu_menu_proxy_insert(proxy, GTK_WIDGET(window), NAUTILUS_WINDOW(window)->details->menubar, 0);
- set $UBUNTU_MENUPROXY only on "good" sessions, so that it won't be set in Gnome Shell/Fallback
- find out why appmenu(-gtk) draws that menu (probably it can't find a dbus listener so falls back to just drawing it) and make it looking at whether the original menubar before drawing it

Also, we can use the method described at instead of checking $DESKTOP_SESSION, but this will work only if Unity/Appmenu starts before Nautilus.

You can disable the old fix while I'll be looking at this.

Dmitry Shachnev (mitya57) wrote :

Unfortuately, neither of first 2 methods works.

@Ted: Do you know what draws that menubar (probably that's not Gtk, because gtk_widget_hide() is called on the menubar). Also, is it possible to use DBusMenu's parse_menu_structure() to create a native DBusMenu and then export it to the appmenu?

Sebastien Bacher (seb128) wrote :

thank you for the comments, the issue got fixed in gtk in precise (the menus stripping will happen only in unity sessions), the hack should not be required so I'm dropping it

Dmitry Shachnev (mitya57) wrote :

Thanks for fixing that! :)

Changed in nautilus (Ubuntu):
status: Triaged → Invalid
Matthieu Baerts (matttbe) wrote :


It seems we have to re-open this bug report because the new version of Nautilus on Oneiric (3.2.1-0ubuntu4.1 - currently available on oneiric-proposed repositories) no longer contains the modification made by Dmitry in order to remove this top menu bar on all sessions except Ubuntu and Ubuntu-2D (e.g.: a Cairo-Dock session, Gnome Shell, Gnome Classic, XFCE, etc. if Nautilus is used to display the desktop content).

Is someone can confirm? :)

harry (harryzhxu) wrote :

Yes , the bug back again on my gnome shell.

Eugene Crosser (crosser) wrote :

I see the unwanted nautilus bar with cinnamon on oneiric (w/proposed)
  Installed: 1:3.2.1-0ubuntu4.1

Sebastien Bacher (seb128) wrote :

the change was incorrect and leading to lot or error and increasing resource usage, it has been reverted. the bug is correctly fixed in precise but that fix require new version of glib and gtk so it's likely it will not go to oneiric

Matthieu Baerts (matttbe) wrote :


@seb128 or somebody else: Is it possible to re-open this bug for Nautilus in Oneiric? :)

I'm proposing a new version of the patch made by Dmitry and reverted in the last version. It's not so different but instead of removing the menubar, menubar's widget is not created for the desktop nautilus window on non-ubuntu session.

I hope it's correct and this version (or something else) can be uploaded on Oneiric-update in order to (quickly? :) ) remove this annoying bar on non-Ubuntu sessions ;)

Please don't hesitate to test the new version and to confirm if it fixes this bug or not and it's also correct for the bug #912379!
This new version of Nautilus is currently building on my ppa:matttbe/ppa =>

    sudo add-apt-repository -y ppa:matttbe/ppa
    sudo apt-get update
    sudo apt-get install nautilus nautilus-data libnautilus-extension1 gir1.2-nautilus-3.0
    sudo add-apt-repository -r ppa:matttbe/ppa

Juan Simón (simonbcn) wrote :

@Sebastian Bacher, if "the bug is correctly fixed in precise but that fix require new version of glib and gtk so it's likely it will not go to oneiric", why do you upgrade the nautilus package (with this bug) in Oneiric?

Sebastien Bacher (seb128) wrote :

Thanks Matthieu for the work, I subscribe ubuntu-sponsors, let's see if people have time to review this with the post feature freeze, ui freeze, beta freeze busy work going on for precise

@Simon: read my previous comment? because the patch was causing issues over the cosmetic annoyance it tries to resolve, increase resource usage, segfaults, session closing ... between having your work lost because the session get closed by lack of resources available and a small graphical glitch in some special setups it seems obvious which issue should get the priority

Changed in nautilus (Ubuntu Oneiric):
status: Fix Released → Triaged
Changed in nautilus (Ubuntu):
assignee: Ted Gould (ted) → nobody
Changed in nautilus (Ubuntu Oneiric):
assignee: Ted Gould (ted) → nobody
mordant (mordant23) wrote :

I just did a quick test of nautilus 3.2.1-0ubuntu4.2 patch on my Linux Mint 12 (which is based off oneiric) system which has Cinnamon, Gnome Shell and Unity on it. So far it seems to be all right. I still have global menu in Unity and no global menu in Cinnamon and Gnome Shell. So far no freezes or problems, but so far it's only been a real quick test. I'll let you know if any problems develop after extensive use.

Thanks Matthieu! I've spent a lot of time googling and going through dconf-editor to find a solution that didn't involve removing appmenu-gtk, etc. and did not stop nautilus managing the desktop. Your version of nautilus is exactly the solution I need.

ogu (trevisiolugo) wrote :


So, is there another solution than waiting for Pangolin upgrade?
Is it possible to revert the nautilus upgrade which has been made few days ago?


Ogu - France

Sebastien Bacher (seb128) wrote :

you can try the ppa listed in comment #48

Bryce Harrington (bryce) on 2012-02-22
description: updated
Matthieu Baerts (matttbe) wrote :

I'm sorry but it seems I can't propose for merging a new bzr branch because this branch seems to not be up to date: lp:ubuntu/oneiric-proposed/nautilus

description: updated
ogu (trevisiolugo) wrote :


Please could you confirm us the next distro upgrade will fix the issue? If yes, i can wait ;) !


Ogu - France

Dmitry Shachnev (mitya57) wrote :

@ogu: Yes, this is fixed in Precise (the status was wrong).

affects: gtk+3.0 (Ubuntu) → ubuntu
Changed in ubuntu:
status: Invalid → Fix Released
affects: ubuntu → gtk+3.0 (Ubuntu)
ogu (trevisiolugo) wrote :


matbonucci (matbonucci) wrote :

 sudo aptitude remove indicator-appmenu appmenu-gtk3 appmenu-gtk
guys this will solve your problem if you don't use Unity (Ubuntu)

Matthieu Baerts (matttbe) wrote :

Yes but this is much better to upload a new version of Nautilus with the new patch ( comment #48 ) instead of removing these appmenu-* packages or waiting for the release of Precise ;)

If someone from ubuntu-sponsors team can help us to upload this new version, it will be helpful for anyone with this bug! ;)

Changed in nautilus (Ubuntu Oneiric):
assignee: nobody → Ken VanDine (ken-vandine)
Ken VanDine (ken-vandine) wrote :

Easiest way to test this is to login with the "GNOME Classic" session, and killall gnome-panel.

You shouldn't see the nautilus menu while the panel reloads.

To test for regressions under unity, verify that after clicking on the desktop when you mouse over the "Desktop" title in the panel you see the menu.

Sebastien Bacher (seb128) wrote :

it has been uploaded and is waiting for review in the queue, unsubscribed sponsors

Martin Pitt (pitti) wrote :

Hello Wildjiji, or anyone else affected,

Accepted nautilus into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Changed in nautilus (Ubuntu Oneiric):
status: Triaged → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Claessens (gagalago) wrote :

I confirm that this bug is fixed on my Ubuntu Oneiric with Gnome-Shell!
Thank you

Matthieu Baerts (matttbe) wrote :

Me too! I confirm that this bug is fixed with Ubuntu Oneiric and a Cairo-Dock session.

@gagalago and pitti: Thank you :)

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.2.1-0ubuntu4.2

nautilus (1:3.2.1-0ubuntu4.2) oneiric-proposed; urgency=low

  * debian/patches/05_desktop_menu_export.patch:
   - Only create the menubar on the desktop on 'Ubuntu*' sessions (LP: #826771)
   - Refreshed and removed 2 new blank lines in the patch
  * debian/patches/04_suppress_umount_in_ltsp.patch,
    debian/patches/17_dont_allow_new_tab_on_desktop.patch and
   - Refreshed
 -- Matthieu Baerts (matttbe) <email address hidden> Sat, 18 Feb 2012 01:23:07 +0100

Changed in nautilus (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.