12

I just can't find the command to display a *.png image! I tried xdg-open command but it failed:

[student@seqpapl1 Images]$ xdg-open adapter_content.png 
xdg-open: no method available for opening 'adapter_content.png'

I am currently running ubuntu linux on the server.

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Genie
  • 123
  • 1
  • 1
  • 5

2 Answers2

17

Use mimeopen -d to set the default application:

mimeopen -d image.png

sample output:

Please choose a default application for files of type image/png
1) ImageMagick (color depth=q16)  (display-im6.q16)
2) GNU Image Manipulation Program  (gimp)
3) Feh (feh)

Select your default application , next time you will be able to use:

mimeopen image.png

or:

xdg-open image.png
GAD3R
  • 63,407
  • 31
  • 131
  • 192
1

or you can also use

gio open image.png

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
user505268
  • 11
  • 1