125
18
It's the default image viewer for Ubuntu, and apparently it's called Eye of Gnome. I would like to be able to launch it from the command line, passing it a file name to open.
125
18
It's the default image viewer for Ubuntu, and apparently it's called Eye of Gnome. I would like to be able to launch it from the command line, passing it a file name to open.
173
The command to use is eog
(Eye of GNOME). And you call it like so:
eog filename
2I came here looking for eye of mate, which is the command eom filename
hope that helps anyone else – EdgeCaseBerg – 2014-10-03T13:41:28.613
26
Use xdg-open
:
xdg-open filename
which opens a file or URL in the user's preferred application.
As long as you use Gnome and eog
is your default image viewer, you can use gnome-open
:
gnome-open filename
If you want an alternative that is independent of the desktop environment, use xdg-open
which is bash wrapper around environment-specific commands.
For now, xdg-open
supports:
exo-open "$1"
),gvfs-open "$1"
, gnome-open "$1"
with fallback to generic open),kde-open "$1"
with fallback to kfmclient exec "$1"
),gvfs-open "$1"
, mate-open $1
),pcmanfm $1
with fallback to generic open),enlightenment_open $1
),open_gnome3 $1
, which is gvfs-open "$1"
with fallback to generic open),cygstart "$1"
),open "$1"
).and tries its luck with other desktop environments (called generics). $1
is your image filename.
xdg-open filename
If you want to figure out how xdg-open
works, you can read bash source code:
$ locate xdg-open
/usr/bin/xdg-open
/usr/share/man/man1/xdg-open.1.gz
$ less /usr/bin/xdg-open
See also similar answer for different question on unix.stackexchange.com.
2
For Fedora you can use shotwell filename
.
eog
is so barebones it can't display animated GIFs. I use XnViewMP, which on the other hand is a bit slower. – Dan Dascalescu – 2017-06-18T00:51:18.540@DanDascalescu, I just tried it on ubuntu, and it worked fine on an animated GIF I created – Vass – 2018-02-16T14:34:24.983
5Thanks for asking and answering this question! I always forget the name of this program. – orlenko – 2013-06-16T22:08:40.273