Re: X graphics

Captain Dondo staggered into the Black Sun and said:
V Sat, 07 Jul 2007 03:07:55 +0000, Hactar napsal(a):
How can I make a very simple app (background a solid color, draw some
black text, that's it) in X? Heck, it can be in text mode as long as
it has a decent selection (2^6 or more) of colors. I know a bit of C
and C++, and a lot more bash.

Xlib and Athena are a pain to work with. You may want to look into
GTK+, as you can do almost anything in it, and it has bindings to Perl,
Python, and most other languages. It's fairly easy to do rapid
protyping with Gtk2::Perl if you're comfortable with Perl.

I see xterm has a 256-color mode, but Ubuntu's apparently wasn't
compiled with it. How much of a PITA is xterm to compile from

xterm shouldn't be difficult to compile from source. It's very strange
that Ubuntu didn't turn on 256-color support. Google for
and run that in your xterm, you should see a definite difference in the
6 color squares. (konsole now seems to support 256 colors, something
that wasn't true a few years ago....)

If all you want is text, google for ncurses, dialog, xdialog,
ansi/vt102/xterm codes...

It's the big selection of color codes that's the real problem. Some
terminal emulators may not support more than 16 colors.

If you're looking for trouble, I can offer you a wide selection.
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see

Relevant Pages

  • Re: Source code of <fortune>
    ... Black Sun and said: ... > fortune binary file. ... ...I don't know whether this'll compile out of the box on HP-sUX, ...
  • Re: dump xterm scroll back buffer to file
    ... > the Black Sun and said: ... xterm probably doesn't have that feature. ... Does 'konsole' work without all that extra KDE related muck? ...
  • Re: Howto Distinguish Prior from KP_Prior
    ... Thomas Dickey staggered into the Black Sun and said: ... and KP_Prior exactly the same way, as does xterm. ... it's not documented except in the source-code, ... It wouldn't surprise me if the remapping wasn't there, ...