In htop, I kill Nautilus, and within one second, it's back, with a new PID!
The restarted Nautilus shows in the Processes list, but has no GUI until I manually launch Nautilus... I've heard mention of Nautilus works in lockstep with the desktop... maybe that is the reason(?).
Is there some sort of "watchdog" program keeping an eye on some distro-critical programs? Monitoring Nautilus doesn't seem like a Linux kernel issue, so I just wonder what is happening here?
Gnome uses a Session Manager (
gnome-session
) to keep track of what it needs to do. It is responsible for bringing up the whole session, all subprocesses, restoring state and saving it when you log out.Among other things, the session manager tries to keep it's instance of Nautilus running. Nautilus has to register with the session manager for that - which it does by default; naturally, there's a command-line option to disable it:
nautilus --sm-disable
You can kill a running Nautilus process for good by running:
killall -9 nautilus
As others have mentioned,
gnome-session
respawns thenautilus
process automatically. It also does so forgnome-panel
andgnome-wm
(which in turn starts the window manager configured by the user, usuallycompiz
ormetacity
).This behavior is customizable through the
desktop > gnome > session > required_components
gconf keys.Editing these value can be useful if you would like to, for instance, run with out the GNOME Panel and only use Docky or AWN.
gnome-session
is responsible for respawning nautilus. As its parent in the process tree, there is no other process that could respawn it.ps -eaH
shows you the hierarchical process tree excerpted here:Chipaca & andrewsomething are both close... :)
The
/desktop/gnome/session/required_components_list
key lists the "components" that should be monitored bygnome-session
, and restarted automatically when they exit. The default value for GNOME 2 is something like[windowmanager,panel,filemanager]
.If you want to prevent nautilus (or whatever "filemanager component" you have configured) from getting (re)started by this mechanism, you can change the value to
[windowmanager,panel]
. (You can still have it start during login by adding it to the list of session start-up programs of course, but it won't get restarted automatically anymore.)What application (with what commandline parameters) gets started for each component is defined under
/desktop/gnome/session/required_components
in a key with the name of the component. It is possible that more components are listed here than are used in the/desktop/gnome/session/required_components_list
key.Now, in case of nautilus, by default when it is not running yet it starts in the background, and if the
/apps/nautilus/preferences/show_desktop
key is set it also shows the Desktop. It is also possible to tell nautilus to behave differently with commandline parameters.Nautilus is being restarted because you have it drawing the desktop. Enter
in a terminal for it to stop doing that, and it then shouldn't come back after killing.
in total do:
and
change to:
X-GNOME-AutoRestart=false
(found it at: https://bbs.archlinux.org/viewtopic.php?id=119254 )
thats all...