183

How do I just restart the nautilus after adding a nautilus script without having to log out.

228

To restart nautilus...

  • First, type the following in your terminal to quit nautilus:

    nautilus -q or killall nautilus

  • Then, open nautilus via Unity menu (press the Super key) or using the run command (Alt + F2).

| improve this answer | |
  • 2
    Is there a way to do this without starting a nautilus window? As in it would be running and display a desktop without bringing it's own window. – Bufke May 10 '12 at 20:15
  • 2
    if nautilus crashes, which happens quite easily in 12.04, then your desktop items are gone. This does not help to bring them back permanently. As soon as you close nautilus, the desktop is empty once more. – Anthon Jul 10 '12 at 22:28
  • 5
    +1 for killall nautilus it should be first solution – sorrow poetry Apr 22 '18 at 13:05
40

Open terminal by Ctrl+Alt+T and try this:

$ nautilus -q && nautilus &

get it done without switching from the terminal.

| improve this answer | |
3

I had a GTK error at one point and nautilus -q did not work. So instead of asking nicely I went a more ridiculous route to kill nautilus and restart.

$ ps -aux | grep nautilus

This will list all processes that have nautilus in description. You should get something like this.

carlos 2070 0.1 0.9 1608528 77500 ? Sl 08:56 0:40 nautilus -n

carlos 29272 0.0 0.0 16744 1004 pts/1 S+ 16:38 0:00 grep --color=auto nautilus

Look for the one with that says nautilus and grab the 4 digit code. Once you have that written down you can kill the process.

$ sudo kill 2070

Nautilus should die and restart automatically. Again I just used this because I had a wierd GTK error when I tried running nautilus -q.

| improve this answer | |
  • FYI, what you did is the same as using killall nautilus from the accepted answer. It finds all processes with the executable named "nautilus" and kills them. Helpful when you know the process's executable name. But if you're ever unsure, you should do a ps -aux | grep <executable> to make sure that you will kill the right process. – Cliff Aug 26 '19 at 6:02
  • Am I confused or did you simply kill a grep process that was already done? Didn't you want to kill process 2070? And you own the process so you don't need sudo – JimLohse Dec 18 '19 at 17:37
  • 1
    @JimLohse yes. Blast. Thank you for spotting that error. I just updated my comment. – Monte Carlo Dec 19 '19 at 18:21
1

Another option without terminal is by closing "Nautilus" from "System Monitor" .

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.