On Windows, I can launch an Explorer window from a command line via "start (dirname)". And this will also launch applications associated with a particular file extension, so I can do "start myfile.txt" and it will open the file in the default text editor (e.g. Notepad). Essentially, Windows exposes a way through the command line to perform the same action as a double-click in Explorer.

Does something similar exist for Gnome? I scanned down the list returned by "apropos gnome", "apropos start", and "apropos open", and nothing looked promising. (I'm using Debian Lenny, if that matters.) I know I can open a file browser via "nautilus (dirname)", etc, but I would prefer to use something that uses my file associations.

My eventual goal is to make an alias from "start" to this command since I'm more familiar with the Windows interface.


5 Answers 5


Use the gnome-open command and it will use the application you have associated with that file type (MIME). For example:

gnome-open foo.pdf
  • Gah! It's so obvious when you know the answer. Thanks!
    – Tadmas
    Oct 16, 2009 at 12:07

A cross-distribution, cross-desktop manager command to achieve this is:

xdg-open foo.bar
 nautilus .

I use it all the time! Works for folders, only.


There is also see and edit:

  # opens PDF viewer
  see file.pdf

  # Opens text editor
  edit file.txt

This is part of the mime-support package.


You can use the executable name of the file manager appended by the path of the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .