All of the open source software that I used,only w3m can display image clearly,I want to try to display image in xterm,how can I accomplish it? I tried 'tput' command to change the color of output characters to display a similar photo.


1 Answer 1


w3m uses a trick to show an image on top of an xterm window, and according to a comment in the code, that applies to more than one terminal emulator. The trick relies upon finding a suitable X window by looking for the WINDOWID of the terminal.

Refer to w3m/w3mimg/x11/x11_w3mimg.c to see how it does this.

As for tput: it is not used for drawing images on a terminal. It retrieves capabilities from the terminal database and (with either exit-codes or writing text) makes the capabilities available for use in scripts that manipulate the terminal.

xterm usually (not always: it's been optional since 1997) comes with a Tek4014 emulator which can be used for vector graphics. w3m does not use that.

  • See also terminology for a terminal emulator that can embed images. Commented Feb 25, 2016 at 9:17
  • I'd rather not discuss that program, since much of its discussion of terminal emulation is less than useful. Ditto for Final Term. Commented Feb 25, 2016 at 9:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .