1

I have referred this link: How to open Nautilus at current command line directory?

but ever since I upgraded to 17.10, running nautilus ., when I am already in a particular directory using cd in the terminal, gives me the following message.

sys:1: PyGIWarning: Nautilus was imported without specifying a version first. Use gi.require_version('Nautilus', '3.0') before import to ensure that the right version gets loaded.
Initializing nautilus-dropbox 2015.10.28

How do I fix this?

I am running Ubuntu 17.10 in Xorg mode

Kewal Shah
  • 1,034
  • 2
  • 13
  • 35
  • 3
    Read [the answer](https://askubuntu.com/a/226757/480481) carefully, you need to `nautilus .`, not just `nautilus`. – pomsky Feb 27 '18 at 15:57
  • @pomsky doing that I get a warning everytime, I have updated the queston. – Kewal Shah Feb 28 '18 at 02:10
  • @devius OP changed the question invalidating Duplicate Close Candidate . Ironically it was a little devious. – WinEunuuchs2Unix Feb 28 '18 at 02:30
  • The particular error you edited into your poast appears to be generated by the [Package python-nautilus.](https://packages.ubuntu.com/search?keywords=python-nautilus) If everything works as advertised otherwise, it's safe to ignore. If not you should likely [register a bug](https://help.ubuntu.com/community/ReportingBugs) – Elder Geek Mar 01 '18 at 16:52

2 Answers2

3

To open Nautilus from the current directory use:

nautilus .

To open with a given file selected use:

nautilus . -s filename

If the file name has spaces enclose it in double quotes (" ).


Warning messages will appear

Nautilus, gedit and other apps are all based on Gnome Took Kit (GTK) and it is infamous for giving warning messages. 99% of the time you can ignore them. Does nautilus open ok with the current directory displayed? That is the only question. For Ubuntu 16.04.3 LTS with xorg there are lots of warnings:

$ nautilus .

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

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

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

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

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

Once again Nautilus works fine and these annoying warning messages are simply part of the Gnome back bone history of Ubuntu and other Linux distributions.

WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
  • Thank you, but on doing that I get a warning everytime, what does it mean and how can I solve it? I have updated the question. – Kewal Shah Feb 28 '18 at 02:08
  • 1
    Nautilus, gedit and other apps are all based on Gnome Took Kit (GTK) and it is infamous for giving warning messages. 99% of the time you can ignore them. Does `nautilus` open ok with the current directory displayed? – WinEunuuchs2Unix Feb 28 '18 at 02:23
  • See this to get rid of warnings https://askubuntu.com/a/1102117/393936 – Julien B. Dec 15 '18 at 16:51
2

The command nautilus takes as parameter the path to open, so if you want to open the current directory, you have to type

nautilus .

The .standing for current directory

Félicien
  • 1,163
  • 1
  • 10
  • 18