Linux For Cynics One user's experiences with Linux


Make Nautilus –no-desktop Default

If you want to use the Nautilus file manager without it trying to manage your desktop, here's a way to make it always run with the --no-desktop option:

Rename the nautilus binary to something else:

sudo mv /usr/bin/nautilus /usr/bin/nautilus.original

Then create a script called nautilus:

sudo touch /usr/bin/nautilus

And open it in your favorite editor make it run nautilus with the --no-desktop option (as well as any other options passed to it) by giving it the following contents:

nautilus.original --no-desktop $@ &

Make it executable:

chmod +x /usr/bin/nautilus

And there you go! Clearly, this trick can work with anything else you want to apply default options to but cannot simply be aliased in baschrc (because not everything is invoked using bash, of course).

If you want to change it back to normal, just replace the "nautilus" script with nautilus.original.

Comments (1) Trackbacks (0)
  1. This so nearly works for me. I use Synapse as a launcher, and often use it to open folders. With this technique, Synapse passes arguments to the nautilus script in such a way that nautilus doesn’t correctly open the location.

    I ask Synapse to open “Project Assets”, which it finds at “/home/mark/Project Assets”, but I’m pretty sure the bash script is understanding that as two arguments because of the space in the middle. It does work just fine for file paths with no spaces.

    So, have you got any ideas for getting around this? (other than removing spaces from all my file and folder names)

Leave a comment

No trackbacks yet.