I am running debian v10.0 on a raspberry pi. I have a directory of pictures with jpg, png and jpeg extensions. When I try to use display image.extension on any of them I get the error

display-im6.q16: unable to open x server @ error/display.c/DisplayImageCommand/433

display --verion returns

Version: ImageMagick 6.9.10-23 Q16

If I run startx into the GUI, I can right-click and open the images in both imageViewer and imageMagick.

How do I use display to view these images while in the command line?

  • 1
    you have to have X running for a program that uses X to work Sep 23, 2019 at 0:50
  • How do you expect images to be rendered in the command line? With colored letters or something? Sep 23, 2019 at 6:52
  • @DmitryGrigoryev i assumed that since X was installed on the system, it would launch some sort of window that I could then exit using an escape character like ctrl+c or such. I'm still orienting myself with linux so I'm not too familiar with all the functionality
    – CLopes1987
    Sep 23, 2019 at 20:51

1 Answer 1


Generally to display images in Linux you need the GUI (graphical user interface) to be running, which you've discovered how to start with the startx command.

There are however some exceptions! Generally a Raspberry Pi connected directly to a monitor users a framebuffer console, which is a high-resolution psuedo-graphics console. If the text isn't massive, you're probably running in framebuffer mode. In this case, you can display images directly using an application that understands the framebuffer. Unfortunately, display from imagemagick doesn't appear to do this. However, a tool called fbi (short for framebuffer imageviewer) can show images in framebuffer mode.

To use fbi to show images in the console, first it needs to be installed. This is done using the package management system commands sudo apt-get update; sudo apt-get -y install fbi. Then, images can be shown full screen using the command fbi -a myimage.jpg. Slideshows can be shown using fbi -a -t 5 *.jpg where 5 is the number of seconds the image will show for. The manpage for fbi has a full description of the command line arguments and is fairly straightforward to read.

  • wow, this is awesome, thank you so much for not only a solution but also the links and information about this!!!
    – CLopes1987
    Sep 23, 2019 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.