What should be used instead of the deprecated gnome-open in Ubuntu 18.04? [duplicate]

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!


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"
...