@Thibault: xdg-open, for sure, and for 2 main reasons:
- xdg-open is more portable: it chooses the most appropriate "open" command for your system, be it Gnome, KDE, LXDE, XFCE, etc, while gnome-open works only in gnome. In fact, in Gnome systems xdg-open used to end up calling gnome-open. So let it choose the suitable opener for you.
- gnome-open is deprecated, and was replaced by gvfs-open. A quick googling reveals https://live.gnome.org/LibgnomeMustDie , and also https://developer.pidgin.im/ticket/15556 offers some insight. xdg-open was updated a long time ago to use gvfs-open if it was available, and fallback to gnome-open for (really) old systems
Worth note that gvfs-open (and thereby xdg-open too) uses the xdg mime database system to choose an application based on mime-type handlers, which is the system used by Preferred Applications, so it respects the *user* preferences.
@Thibault: xdg-open, for sure, and for 2 main reasons:
- xdg-open is more portable: it chooses the most appropriate "open" command for your system, be it Gnome, KDE, LXDE, XFCE, etc, while gnome-open works only in gnome. In fact, in Gnome systems xdg-open used to end up calling gnome-open. So let it choose the suitable opener for you.
- gnome-open is deprecated, and was replaced by gvfs-open. A quick googling reveals https:/ /live.gnome. org/LibgnomeMus tDie , and also https:/ /developer. pidgin. im/ticket/ 15556 offers some insight. xdg-open was updated a long time ago to use gvfs-open if it was available, and fallback to gnome-open for (really) old systems
Worth note that gvfs-open (and thereby xdg-open too) uses the xdg mime database system to choose an application based on mime-type handlers, which is the system used by Preferred Applications, so it respects the *user* preferences.