Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Until now I used characters to draw images, shapes etc in a terminal.

Is it possible to draw a single pixel?

Let's say:

foo 1 1 red

This will draw a red pixel at the coordinate (1, 1).

Is there an existing application that will do this job?

Currently running Ubuntu 14.04.

share|improve this question
What kind of terminal do you have? A DEC GT40? – Anthon Jul 25 '14 at 6:52
@Anthon Gnome-Terminal (that comes with Ubuntu) – Ionică Bizău Jul 25 '14 at 6:56
@Anthon A DEC GT40 would be useful, but it's too expensive... :-) – Ionică Bizău Jul 25 '14 at 6:57
@terdon I voted to reopen because this isn't intrinsically a programming question (I did remove the c and c++ tag, because if you're going to write C or C++ code, that is off-topic here). “There's no such feature, you'd need to program it” would be a proper answer here — except that it would be wrong: a good answer would mention Tektronix and drawing over the terminal window like w3m does. – Gilles Jul 25 '14 at 17:52
@Gilles fair enough, I've reopened. I closed it because it was in the process of being migrated to SO and it was not welcome there. – terdon Jul 25 '14 at 18:16
up vote 4 down vote accepted

Terminals are character-cell displays and don't support drawing pixel graphics. Not even when running in X11; although it's certainly possible to draw individual pixels when talking directly to an X server, if your program is talking to a terminal it can only ask the terminal to display characters.

To display graphics instead of text, you'll need to write a program that interacts directly with the X server. This is typically done through a UI toolkit library such as GTK, Qt, or wxWidgets.

share|improve this answer
There are all sorts of terminals, some with graphical capabilities (like the Tektronix mode of xterm, or the embedding of images of terminology). Note that terminal also refers to X11 terminals (the successors of the things like the Tektronix ones) – Stéphane Chazelas Jul 25 '14 at 8:41
Cool! Some enthusiasts draw 3d teapot in xterm =) dim13.org/2009/02/teapot – gena2x Jul 25 '14 at 11:02
If the terminal can only "draw" chars, then maybe the pixel should be made a char so it can be drawn... – On a eu. Jul 25 '14 at 21:23

Have a look at the Drawille library. It uses the UTF braille characters to draw pixels.

share|improve this answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – slm Sep 30 '15 at 3:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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