GNOME Bugzilla – Bug 571417
nautilus flips out when show_desktop is unchecked
Last modified: 2010-03-17 10:20:16 UTC
the bug has been opened on https://bugs.launchpad.net/bugs/328341 "Jaunty 64-bit. This just started a couple days ago - i traced it to having /apps/nautilus/preferences/show_desktop unchecked. As soon as this option is unchecked, hidden windows start spawning like crazy in gnome-panel's window list, dbus-monitor shows huge amounts of errors (about 500K in 3 seconds), nautilus-share starts crashing and restarting, CPU load on my machine goes from 1-2% to 30-50%, and I'm not sure what else. Re-enabling show_desktop stops all of this immediately." that's an issue using GNOME 2.25.90
I am using Xubuntu Jaunty with up to date packages as of 02.11.09. I enjoy nautilus and Thunar so I installed nautilus via apt-get on my xubuntu desktop. I am able to open and use it just fine (I run it using the --no-desktop command). The bug happens when I attempt to close out of nautilus. It re-opens itself. I always have to close it 6 six times before it quicks re-opening itself. This number never changes... and the speed of closing it does not matter. (I.e. I can close it 3 times... wait 5 min... close it 3 more times or just closely sequentially). Output of terminal: $blah@blah-desktop:~$ nautilus --no-desktop $Initializing nautilus-share extension $** (nautilus:22180): WARNING **: Unable to add monitor: Not supported $** (nautilus:22180): WARNING **: Unable to add monitor: Not supported $Shutting down nautilus-share extension $--- Hash table keys for warning below: $--> file:///home/geota $(nautilus:22180): Eel-WARNING **: "nautilus-metafile.c: metafiles" hash table still has 1 element at quit time (keys $above) $(nautilus:22180): Eel-WARNING **: "nautilus-directory.c: directories" hash table still has 1 element at quit time rapidshare attacment of recordmydesktop of the bug in action: http://rapidshare.com/files/197074067/nautbug.ogv.html
Possibly a duplicate of bug #559038. Which language are you using? If you're not using it already, can you try to reproduce the bug using the English locale?
I am already using the english locale version of Xubuntu.
I thought it was worth to mention that now when I restart I am spammed by 30+ nautilus browser windows... when I can manage to get 'killall nautilus' off I am left with one nautilus windows that again takes me 6 times of 'X' out of it to actually close nautilus.
Running jaunty/32bit in a VMware Player instance, failsafe Terminal login and twm, if I run nautilus from the command-line in the xterm window, I get this: ~$ nautilus Initializing nautilus-share extension *** glibc detected *** nautilus: double free or corruption (fasttop): 0x08e4afe8 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb74bb5a4] /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb74bd556] /usr/lib/libglib-2.0.so.0(g_free+0x36)[0xb7931396] /usr/lib/libbrasero-media.so.0[0xb5a1fc10] /usr/lib/libbrasero-media.so.0[0xb5a2003e] /usr/lib/libglib-2.0.so.0[0xb7953cdf] /lib/tls/i686/cmov/libpthread.so.0[0xb74394ff] /lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0xb75303fe]
removing brasero and librasero-media allows nautilus to start.
the issue is that gnome-session automatically restart nautilus
A more detailed bug report in Ubuntu has been filed here as the parent bug: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/325973 Screencast of the bug in action: http://launchpadlibrarian.net/22762464/screencast.ogv If show_desktop is unchecked, running nautilus in terminal yields the following error message. If show_desktop is checked, nautilus opens and no error messages are displayed. $ nautilus (nautilus:1307): Unique-DBus-WARNING **: Error while sending message: Message did not receive a reply (timeout by message bus) $ This bug originated with the update of nautilus(-data) from 1:2.25.3-0ubuntu2 to 1:2.25.4-0ubuntu1, diff: http://launchpadlibrarian.net/21900685/nautilus_1%3A2.25.3-0ubuntu2_1%3A2.25.4-0ubuntu1.diff.gz As a result, it occurs in 1:2.25.4-0ubuntu1 but not in 1:2.25.3-0ubuntu2. nautilus (1:2.25.4-0ubuntu1) jaunty; urgency=low * New upstream version: - Don't show desktop files from other desktops than Gnome on the desktop - Support crossfades of desktop backgrounds - Don't snap desktop icons outside right margin - Fix crashes and leaks (lp: #321359)
https://bugzilla.redhat.com/show_bug.cgi?id=485375 is the Fedora bug for this, where I have at least one report of AutostartCondition=GNOME /apps/nautilus/preferences/show_desktop fixing the issue.
the "AutostartCondition=GNOME /apps/nautilus/preferences/show_desktop" only workaround the issue for desktop start, you still get the same issue after opening a nautilus dialog and closing it
just to clarify the previous comment gnome-session will use the key to start or not the autostart but not to determine if it should be respawned
Either way, its a pretty bad bug...
The real bug is that EggSmClient doesn't allow we to change the respawn policy after startup. So there is no way I can tell the session that the exit was expected.
There’s a workaround in #580793.
*** Bug 576918 has been marked as a duplicate of this bug. ***
Also reported as Debian bug 525718: http://bugs.debian.org/525718 . Note that the workaround patch described in GNOME bug #580793 , changing the desktop file, apparently did not work, since the problem still occurs with Debian version 2.26.2-3 which includes that patch.
Marking as NEW given confirmation by several different users, from different distributions even.
*** Bug 580793 has been marked as a duplicate of this bug. ***
Created attachment 135669 [details] [review] Make nautilus autostarted The fact that show_desktop exists and can be unchecked shows that, in the end, nautilus has nothing to do in the required_components of gnome-session. GNOME is perfectly usable without nautilus to draw the desktop, it saves a few megabytes of RAM, and many users prefer it this way. Having it in the required components makes this impossible, since gnome-session will always respawn it. Therefore, the correct fix is to make nautilus an autostart application rather than a required component. This is what the attached patch does: - Installation of the desktop file to the autostart directory. - Conditional startup depending on the value of show_desktop (gnome-session will start it cleverly as needed this way). - Removal of the AutoRestart, on the same rationale, and because it interacts very badly with session management. - Update of the code that hardcodes the file location. The other part of the fix is to remove "filemanager" from the gnome-session required components. I can cook a patch for that as well, but it’s pretty straightforward.
I can confirm that Josselin's fix from comment #19, as implemented in the Debian packages gnome-session 2.26.1-4 and nautilus 2.26.2-4, fixes the problem.
OpenSolaris bug also: http://defect.opensolaris.org/bz/show_bug.cgi?id=9528 I don't actually quite agree with the approach that http://bugzilla.gnome.org/show_bug.cgi?id=571417#c19 takes. The real question is do we know why nautilus is respawned when the gconf key is changed. That is, why does it causes gnome-session to think nautilus has exited at that point? While gnome-session does not need nautilus to run, the default is that it needs, filemanager, windowmanager and panel as intended as a design decision. so changing it to work around a bug shouldn't be the final solution an sounds wrong to me :).
(In reply to comment #21) > I don't actually quite agree with the approach that > http://bugzilla.gnome.org/show_bug.cgi?id=571417#c19 takes. The real question > is do we know why nautilus is respawned when the gconf key is changed. That is, > why does it causes gnome-session to think nautilus has exited at that point? As the GConf key is made an autostart condition, gnome-session monitors its changes. When you check it, it does not think nautilus has exited, it just notices nautilus is requested to be started. > While gnome-session does not need nautilus to run, the default is that it > needs, filemanager, windowmanager and panel as intended as a design decision. > so changing it to work around a bug shouldn't be the final solution an sounds > wrong to me :). I disagree with gnome-session needing a file manager. It needs a window manager and a panel, but it works perfectly without nautilus being started.
(In reply to comment #22) > (In reply to comment #21) > > I don't actually quite agree with the approach that > > http://bugzilla.gnome.org/show_bug.cgi?id=571417#c19 takes. The real question > > is do we know why nautilus is respawned when the gconf key is changed. That is, > > why does it causes gnome-session to think nautilus has exited at that point? > > As the GConf key is made an autostart condition, gnome-session monitors its > changes. When you check it, it does not think nautilus has exited, it just > notices nautilus is requested to be started. What is happening here is the key, isn't it? I still don't think nautilus should cause the signal t gnome-session that it needs to be restarted. I need to dig a bit more to find out why. > > > While gnome-session does not need nautilus to run, the default is that it > > needs, filemanager, windowmanager and panel as intended as a design decision. > > so changing it to work around a bug shouldn't be the final solution an sounds > > wrong to me :). > > I disagree with gnome-session needing a file manager. It needs a window manager > and a panel, but it works perfectly without nautilus being started. > Okay. I read your comment properly this time. If we are to move nautilus to be an autostart app, GNOME should provide a nice background, ideally branded. Otherwise having a blank background looks for a start (despite s short period of time) look poor. Going in a tangent, it seem sthat the desktop menu is *not* available when show_desktop is False. Is anyone seen that?
(In reply to comment #23) > (In reply to comment #22) > > As the GConf key is made an autostart condition, gnome-session monitors its > > changes. When you check it, it does not think nautilus has exited, it just > > notices nautilus is requested to be started. > > What is happening here is the key, isn't it? I still don't think nautilus > should cause the signal t gnome-session that it needs to be restarted. I need > to dig a bit more to find out why. I think you’re a bit confused. Currently, nautilus registers (with XSMP) to gnome-session with AutoRestart enabled. This is what is making it restart in a loop when it exits - even when it exits for the simple reason that no nautilus process is needed when the background is not drawn. My proposal is to make it an autostart application with an autostart condition, it is a completely different startup scheme, and here the startup is not triggered by XSMP. > > I disagree with gnome-session needing a file manager. It needs a window manager > > and a panel, but it works perfectly without nautilus being started. > > > > Okay. I read your comment properly this time. If we are to move nautilus to be > an autostart app, GNOME should provide a nice background, ideally branded. > Otherwise having a blank background looks for a start (despite s short period > of time) look poor. gnome-settings-daemon already sets the background, nowadays, if nautilus is not started, so this is already here > Going in a tangent, it seem sthat the desktop menu is *not* available when > show_desktop is False. Is anyone seen that? What do you mean by "desktop menu"? The right-click menu on the desktop? This is expected, since it is simply the nautilus context menu.
(In reply to comment #24) > (In reply to comment #23) > > (In reply to comment #22) > > > As the GConf key is made an autostart condition, gnome-session monitors its > > > changes. When you check it, it does not think nautilus has exited, it just > > > notices nautilus is requested to be started. > > > > What is happening here is the key, isn't it? I still don't think nautilus > > should cause the signal t gnome-session that it needs to be restarted. I need > > to dig a bit more to find out why. > > I think you’re a bit confused. My confusion is why show_desktop set to False that nautilus exits? To me show_desktop is to ask nautilus not to draw the background (and possibly not to provide the desktop menu). since nautilus is already loaded, to exit and to start again when user needs to do file manipulation seems redundant. With your proposal, does it do these?
(In reply to comment #25) > My confusion is why show_desktop set to False that nautilus exits? > To me show_desktop is to ask nautilus not to draw the background (and possibly > not to provide the desktop menu). since nautilus is already loaded, to exit and > to start again when user needs to do file manipulation seems redundant. It exits because it would be pointless to keep a nautilus process in memory if it has nothing to do. The same could be said of almost all GNOME applications; for example, the Gedit process does not remain in memory when there are no files being edited. > With your proposal, does it do these? My proposal does not change this behavior. On the contrary, it relies on it.
> It exits because it would be pointless to keep a nautilus process in memory if > it has nothing to do. You are loosing all the automount and media handling. I guess you are probably disagreeing with nautilus handling that, but it does. So it is not correct that nautilus has nothing to do.
(In reply to comment #27) > > It exits because it would be pointless to keep a nautilus process in memory if > > it has nothing to do. > > You are loosing all the automount and media handling. I guess you are probably > disagreeing with nautilus handling that, but it does. So it is not correct that > nautilus has nothing to do. > Ah, *that* explains it. I indeed haven't had automatic mounting of removable media and such since about the time of that upgrade. So yeah, this fix needs further fixing. Given what you described, it sounds like nautilus needs to stop exiting when show_desktop==false.
(In reply to comment #28) > (In reply to comment #27) > > > It exits because it would be pointless to keep a nautilus process in memory if > > > it has nothing to do. > > > > You are loosing all the automount and media handling. I guess you are probably > > disagreeing with nautilus handling that, but it does. So it is not correct that > > nautilus has nothing to do. > > > > Ah, *that* explains it. I indeed haven't had automatic mounting of removable > media and such since about the time of that upgrade. So yeah, this fix needs > further fixing. Cross-reference: I've filed this with Debian as http://bugs.debian.org/538108
This is still a problem. I'm currently being bitten by it on Ubuntu Karmic. Looking at distro bug reports, it seems that users are mostly working around this by disabling respawning of nautilus from gnome-session, or giving up and enabling the show_desktop setting which they don't want. > Given what you described, it sounds like nautilus needs to stop exiting when > show_desktop==false. This seems to be the correct fix. Is anyone working on this?
It seems that there is a very nice workaround here which I wish to have found weeks ago. The problem here is caused by the fact that nautilus exits when the last window no longer found. There is though a gconf key that control this. See its descriptiions: key name: /apps/nautilus/preferences/exit_with_last_window Short description: Nautilus will exit when last window destroyed Long description: If set to true, then Nautilus will exit when all windows are destroyed. This is the default setting. If set to false, it can be started without any window, so nautilus can serve as a daemon to monitor media automount, or similar tasks. so set this key to false, then you can avoid seeing the gnome-session spinning and while still have nautilus running in the background. So, if you want to work around this bug permanently, you can set this key as mandatory so users can never cause this bug accidentally. May be the nautilus maintainer can set the value default to FALSE?
(In reply to comment #31) > It seems that there is a very nice workaround here which I wish to have found > weeks ago. The problem here is caused by the fact that nautilus exits when the > last window no longer found. There is though a gconf key that control this. > See its descriptiions: > > key name: /apps/nautilus/preferences/exit_with_last_window > Short description: > Nautilus will exit when last window destroyed > > Long description: > If set to true, then Nautilus will exit when all windows are destroyed. This is > the default setting. If set to false, it can be started without any window, so > nautilus can serve as a daemon to monitor media automount, or similar tasks. > > so set this key to false, then you can avoid seeing the gnome-session spinning > and while still have nautilus running in the background. > > So, if you want to work around this bug permanently, you can set this key as > mandatory so users can never cause this bug accidentally. > > May be the nautilus maintainer can set the value default to FALSE? This sounds like the ideal solution. Thanks for pointing it out!
Just pinging this bug. Debian's nautilus packages have set exit_with_last_window=false since October and that makes show_desktop=false work fine without breaking automounting. Any thoughts on making exit_with_last_window=false the default configuration?
exit_with_last_window=false means that all nautilus instances started will never exit, not just the one spawned by gnome-session. So if you normally don't use nautilus all the time, perhaps with some non-gnome DE (which is typically when show_desktop is false) but just start it when you need it, then this change will make it never exit. Otoh, such a configuration could just change exit_with_last_window.
I set exit_with_last_window=false in: http://git.gnome.org/browse/nautilus/commit/?id=ba6a7c6e1098c5cb88fb7468e98bf9f58ff6b543 We will probably change it back when we move the automount handling out of nautilus.