Pixel graphics in linux terminal application

I am developing a C ++ application that will run on a headless server and track some statistics. The application will work in the terminal in a screen session so that I can log in via SSH and check these statistics.

Now, what I want to do is display graphs of various data. To do this, of course, I need pixel-to-pixel access, which is not possible with ncurses or S-Lang. I learned about DirectFB (and these are C ++ DFB ++ and ++ DFB wrappers), but cannot find any convincing evidence if you can draw graphics with it inside the terminal.

Is there a directfb way? Will it work fine in a screen session without creating additional windows? If not, is there a library there that can achieve what I want?

Edit: Ideally, I would certainly prefer a library with widget support, so I don't need to create tons of classes to emulate text fields / scrollbars / ...

+7
source share
1 answer

You can make your application a web interface . You can use for example. Wt or Onion to make your application an HTTP server (or you can make it a FastCgi application) and use SVG (possibly using Javascript and Ajax tricks) to display vector graphics (or create pixel PNG or JPEG or GIF images, for There are several libraries).

I don’t think DirectFB works with SSH, and I believe that it is deprecated (for example, GTK3 no longer supports it).

You can also generate Gnu Plot graphics (by creating the appropriate commands), but this is not very interactive.

I don’t think that making graphics via ssh without X makes sense if you don’t want only ASCII art (which I think is not suitable for your needs).

+7
source

All Articles