Basically, I want to open the current folder I'm in from terminal. I do gnome-open .
from terminal and this opens the current folder I'm in.
In my .bashrc
, I have a simple function called open
that does this for me.
function open() { gnome-open . }
So I just call open
, and it works. The only issue is that I get a bunch of warning messages when I do this?
(nautilus:414): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:414): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed
(nautilus:414): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(nautilus:414): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(nautilus:414): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
I don't really care about the warning messages, I just don't want to see them in the terminal. How can I hide
warning messages that come from calling open?
function open() { gnome-open . [ignore all warnings, just do what your asked] }
2>/dev/null
to the function. I don't know if it will work since I don't have gnome, but that is the universal "don't give me your sass" modifier./dev/null
.