This question already has an answer here:

I used to open images with gnome-open from a terminal, but after installing Ubuntu 18.04, the library is missing and if I search from apt, it shows:

➜  data git:(master) ✗ apt search gnome-open                    [18/06/14|11:35AM]
Sorting... Done
Full Text Search... Done
libgnome2-bin/bionic 2.32.1-6 amd64
Deprecated GNOME 2 library - binary files

Are there any substitution for this command?

Thank you!

marked as duplicate by David Foerster, Community Jun 14 at 12:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 10 down vote accepted

Use the xdg-open wrapper instead, or gio from libglib2.0-bin. Both are installed by default in Ubuntu 18.04.

I'd prefer xdg-open, which wraps around several DE-specific openers (and will likely be kept updated to use whichever tools are currently supported). For example, the old GNOME3 tool used to be gvfs-open. xdg-open used to use gvfs-open, and after it was deprecated, xdg-open has been updated to use gio open.

In 18.04:

$ grep -e gio -e gvfs "$(command -v xdg-open)"
    if gio help open 2>/dev/null 1>&2; then
        gio open "$1"
    elif gvfs-open --help 2>/dev/null 1>&2; then
        gvfs-open "$1"

In 16.04:

$ grep -e gio -e gvfs $(command -v xdg-open)
    if gvfs-open --help >/dev/null 2>&1; then
        gvfs-open "$1"
  • 3
    You could also define an alias from gnome-open to xdg-open. Old habits die hard! – Eric Duminil Jun 14 at 8:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.