Can I remove the "open in terminal" menu item from nautilus?

In recent versions of Nautilus such as 3.14 (included with Ubuntu 15.04), the Open in Terminal command is part of the gnome-terminal package, which installs the libterminal-nautilus extension (at /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so).

It can be easily removed in terminal w/ sudo:

$ sudo mv -vi /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so{,.bak}

Afterwards you need to quit Nautilus to see the changes applied:

$ nautilus -q

(nautilus:16373): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:16373): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:16373): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(nautilus:16373): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:16373): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

If Nautilus does not quit this way successfully (e.g. you see a time-out), you can command your operating system to kill it:

$ pkill -e nautilus
nautilus killed (pid 15962)

Afterwards you can restart Nautilus and is will show the entry removed.

Before:

before: nautilus context-menu with "open in terminal" entry

After:

after: nautilus context-menu without "open in terminal" entry

Refs:

  • Please remove nautilus-open-terminal package - Bug #1451166 reported by Adam Dingle in May 2015)