1

I have recently upgraded from Ubuntu 16.04 to 18.04. In the previous version, I could open Nautilus from the command line and continue to use the command line afterwards; it didn't block.

In Ubuntu 18.04 however, when I enter the command "nautilus", it blocks the terminal and I can't enter any commands until that Nautilus window is closed.

Previously I'd put this in my .bash_aliases: alias nautilus='nautilus 2>/dev/null' to deal with all the rubbish Nautilus likes to output to stderr.

I'm now using this as a workaround for the terminal blocking issue:

nautilus() {
    { xdg-open "${@:-$PWD}" &>/dev/null & disown; } 2>/dev/null
}

This seems to work fine and using xdg-open means it is more portable to other desktops (works on Raspbian anyway!).

But I'd like to know why Nautilus blocks now when it previously didn't.

2

In the previous version, I could open Nautilus from the command line and continue to use the command line afterwards; it didn't block.

Add an & at end of the commandline like so:

nautilus &

You will still see notices in the terminal session but will also have a prompt when you press Enter. Example:

enter image description here

But I'd like to know why Nautilus blocks now when it previously didn't.

One of the many changes to the way our system works after Canonical dropped Unity. We now use GNOME 3 and Wayland.

You could also add the & to your regular nautilus command by making an alias, symlink or function to nautilus.

  • Doesn't 18.04 use Xorg by default, with Wayland available as an option? – wjandrea Nov 15 '18 at 19:54
  • The problem with & is that it will close the Nautilus window when I close the terminal window. I did try a bunch of things, hence the workaround I've got... which does work. I'm just intrigued/irritated at this change not least because AFAIK, no other file manager does this. – Peter Ryan Nov 15 '18 at 20:42
  • In previous versions nautilus always keep an running instance in the background so execute nautilus command is not blocking, the real job is done by the background process. In 18.04, nautilus will end itself several seconds later if there's not any file manager window. I don't know how you can change this behavior. – Alvin Liang Nov 23 '18 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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