After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571417 - nautilus flips out when show_desktop is unchecked
nautilus flips out when show_desktop is unchecked
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Navigation
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 576918 580793 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-02-12 09:09 UTC by Sebastien Bacher
Modified: 2010-03-17 10:20 UTC
See Also:
GNOME target: 2.28.x
GNOME version: 2.25/2.26


Attachments
Make nautilus autostarted (2.42 KB, patch)
2009-05-31 15:52 UTC, Josselin Mouette
none Details | Review

Description Sebastien Bacher 2009-02-12 09:09:32 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
Comment 1 Adrian Maceiras 2009-02-12 15:08:05 UTC
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
Comment 2 Cosimo Cecchi 2009-02-12 19:05:45 UTC
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?
Comment 3 Adrian Maceiras 2009-02-12 20:42:11 UTC
I am already using the english locale version of Xubuntu.
Comment 4 Adrian Maceiras 2009-02-13 04:02:51 UTC
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.
Comment 5 Bob Bagwill 2009-02-13 18:31:24 UTC
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]
Comment 6 Bob Bagwill 2009-02-13 19:32:20 UTC
removing brasero and librasero-media allows nautilus to start.
Comment 7 Sebastien Bacher 2009-02-16 11:15:56 UTC
the issue is that gnome-session automatically restart nautilus
Comment 8 Dara Adib 2009-02-17 21:52:50 UTC
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)
Comment 9 Matthias Clasen 2009-03-12 15:02:09 UTC
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.
Comment 10 Sebastien Bacher 2009-03-12 15:35:06 UTC
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
Comment 11 Sebastien Bacher 2009-03-12 15:37:33 UTC
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
Comment 12 Matthias Clasen 2009-03-12 16:03:25 UTC
Either way, its a pretty bad bug...
Comment 13 Alexander Larsson 2009-03-13 08:32:07 UTC
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.
Comment 14 Josselin Mouette 2009-04-29 20:02:31 UTC
There’s a workaround in #580793.
Comment 15 Cosimo Cecchi 2009-05-06 10:38:14 UTC
*** Bug 576918 has been marked as a duplicate of this bug. ***
Comment 16 Josh Triplett 2009-05-28 19:17:45 UTC
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.
Comment 17 Josh Triplett 2009-05-28 19:35:00 UTC
Marking as NEW given confirmation by several different users, from different distributions even.
Comment 18 Josselin Mouette 2009-05-31 15:42:08 UTC
*** Bug 580793 has been marked as a duplicate of this bug. ***
Comment 19 Josselin Mouette 2009-05-31 15:52:24 UTC
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.
Comment 20 Josh Triplett 2009-06-01 02:47:48 UTC
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.
Comment 21 Ghee Teo 2009-06-19 10:03:55 UTC
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 :).
Comment 22 Josselin Mouette 2009-06-19 10:12:53 UTC
(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.
Comment 23 Ghee Teo 2009-06-19 10:39:55 UTC
(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?

Comment 24 Josselin Mouette 2009-06-19 10:48:22 UTC
(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.
Comment 25 Ghee Teo 2009-06-19 11:01:53 UTC
(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?
Comment 26 Josselin Mouette 2009-06-19 11:08:01 UTC
(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.
Comment 27 Matthias Clasen 2009-06-19 14:05:37 UTC
> 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.
Comment 28 Josh Triplett 2009-06-28 17:10:30 UTC
(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.
Comment 29 Josh Triplett 2009-07-23 05:06:01 UTC
(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
Comment 30 Martin Ling 2009-10-06 10:21:28 UTC
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?
Comment 31 Ghee Teo 2009-10-20 17:00:59 UTC
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?
Comment 32 Josh Triplett 2009-10-20 17:24:35 UTC
(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!
Comment 33 Josh Triplett 2010-02-01 20:11:51 UTC
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?
Comment 34 Alexander Larsson 2010-03-17 10:12:52 UTC
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.
Comment 35 Alexander Larsson 2010-03-17 10:20:16 UTC
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.