Question

I want to open .png file on my VirtualBox Fedora VM running on Windows 7 host? Is there a way to view the file using command line?

Note: I have tried display ####.png as well as less ####.png. Installed ImageMagick and have libpng version 1.5.9 successfully installed over my VM.

Below is the error message for display

[hue@sandbox ~]$ display -size 1280x1024 -window root ####.png display: unable to open X server `' @ error/display.c/DisplayImageCommand/424.

Was it helpful?

Solution

For this approach to work, you need to have a windowing environment to render the image in.

You can either:

  • run an X server in the virtual machine or
  • run an X server on Windows, then SSH from Windows to the VM (with X tunnelling enabled) before running display

Alternatively, share the file over the network (e.g. use VMWare's shared file systems, or run Samba or use an HTTP server) and view the image using a Windows image viewer.


Alternatively, convert the image to ASCII Art so it can be displayed on a console.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top