Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
What kind of terminal do you have? A DEC GT40? –  Anthon Jul 25 at 6:52
    
@Anthon Gnome-Terminal (that comes with Ubuntu) –  Ionică Bizău Jul 25 at 6:56
1  
@Anthon A DEC GT40 would be useful, but it's too expensive... :-) –  Ionică Bizău Jul 25 at 6:57
1  
@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 at 17:52
1  
@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 at 18:16

1 Answer 1

up vote 2 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
5  
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 at 8:41
2  
Cool! Some enthusiasts draw 3d teapot in xterm =) dim13.org/2009/02/teapot –  gena2x Jul 25 at 11:02
    
If the terminal can only "draw" chars, then maybe the pixel should be made a char so it can be drawn... –  Amphiteóth Jul 25 at 21:23

Your Answer

 
discard

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.