gnome-open: Open Anything from the Command Line December 16, 2006

Posted by Carthik in commands

There is a command called gnome-open which I find very handy. I thought of sharing it with you, and was searching for documentation on it, and found none, neither on the web using google, nor on the system. No man page entry, or info entry. All the more reason I should document what I know about it.

Simply put, the command

gnome-open opens the item specified by the url with the preferred GNOME app for that file/mime-type.

In a sense, this command resembles the universal “open” command on Mac OSX.

Read on for examples…



Examples include:

gnome-open google.com

This will open the specified website in your preferred browser

gnome-open mailto:someone@example.com

This will start a new email to the specified address in your preferred mail client

gnome-open .

This will open the current directory you are in, using Nautilus

gnome-open ./Documents/

This will open the specified directory using Nautilus

gnome-open star.pdf

Will open star.pdf in Evince, or your preferred pdf reader

gnome-open foo.txt

Will open foo.txt in a text editor

This goes on, for all possible mime types.