60

What is a current replacement of gnome-open command (generic open of files based on the type)?

Before:

gnome-open mydoc.pdf  # opened PDF in default application

Now:

gnome-open
The program 'gnome-open' is currently not installed.  You can install
it by typing: sudo apt-get install libgnome2-0
alfC
  • 3,532
  • 5
  • 32
  • 43

2 Answers2

81

You can use xdg-open to open documents, like so:

xdg-open mydoc.pdf

This has a bonus of being desktop agnostic so it should work regardless of what desktop the user has installed. In GNOME itself gnome-open has been replaced by gvfs-open.

References:

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
  • 6
    As of Ubuntu 17.10 Artful Aardvark, `gvfs-open` prints a deprecation warning to use `gio open` instead. – clpo13 Mar 05 '18 at 23:47
6

You can use gio too. For example gio open notes.doc.

DK Bose
  • 41,240
  • 22
  • 121
  • 214
Vassilis
  • 427
  • 4
  • 9
  • Interesting, GIO seems to be a very strange thing. I wonder what can be useful for, other than "open". – alfC Apr 03 '18 at 03:38