Menu

#237 install with linux terminal under linux

open
nobody
None
5
2018-08-08
2018-08-07
No

First things first:
See the config.log (attached) for more information.
My Architekture: uname -a output: Linux X230-gtca 4.13.0-46-generic #51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux.
* Prerequisites are(?) installed:
1. I added the deb-src ppa's and ran apt update
2. I ran sudo apt build-dep gnuplot to prepare for installing

I want to install the newest stable release 5.2.4, to be able to use the svga and linux terminals because I'm planning on using a rather minimalistic system (little use of X) in the near future.

The config put out that linux won't be installed and after i searched the log and the web i reasoned that at least the library svgalib is missing. In this lib's README/References (part 7) is talk about some gnuplot patches but I'm not able to find them on their link.

Can I get Instructions on
how to get the patches (If they're neccessary) and
ensure that they are meant for the version of svgalib I'd like to install
how to apply them (I don't have a clue since I never did it before / a link to a good tutorial would be enough -- i could as well run info patch and read but then i wouldn't be sure to do the right things).
how to configure svgalib such that it's best for gnuplot. (They don't have a configure script but only a Makefile.cfg that is included in Makefile and sets the relevant flags).

For sure a different way to get to X-less graphics (like a terminal that is easier to obtain/is installed by default) would be sufficient too. I'm aware that there is the dumb terminal.

1 Attachments

Discussion

  • Thomas Axmann

    Thomas Axmann - 2018-08-07

    Sorry for the bad formatting. There should have been lists but it all went itallic.

     
  • Ethan Merritt

    Ethan Merritt - 2018-08-07

    I have wondered whether anyone is still using the svga terminal driver in gnuplot. The last I saw it in use myself was 10 years ago, but these things live on in odd corners so I don't really know.

    The link you show for svgalib is truly ancient. That source version (1.4.3) is from 20 years ago! Any gnuplot patches referred to by a 20 year old README are long gone. Just for comparison, the svgalib included in the linux distro I use (Mageia) is 1.9.25 . Does Ubuntu/Debian not provide something more recent?

    So, to your question. Are you sure this is what you want? svgalib basically runs at the hardware level with output to the linux console. I.e. the minimal text interface you see briefly when booting the system or if you boot into init levels <=3. So yes, if you wanted to run a truly minimal linux system with no other graphics this might be an option. But then why would you be running Ubuntu? Anyhow, with the caveat that I have not done this since 10 years ago using gnuplot version 4.2, the notes I made for myself at the time were:

    • install libsvga and any dependencies
    • configure and build gnuplot --with-linux-vga
    • create device node for programmatic use of the hardware:
       modprobe svgalib_helper
       mknod -m 666 /dev/svga c 209 0
    
    • install gnuplot suid root so that it can manipulate the hardware through svga
    • run gnuplot with "set term linux"

    Other options:
    Maybe. Can you clarify exactly what environment you need this to work in? Will you have any other terminal emulators or interfaces available besides the raw linux console? For example I see that there is a program called "yaft" hosted on GitHub that can serve as an alternative to the linux console and supports sixel graphics. I've never used it, but that sounds like a much better solution than svga. Current gnuplot has two different options for sixel graphics output.

     
  • Ethan Merritt

    Ethan Merritt - 2018-08-07

    By the way, please report back which if any solution worked for you. It would be nice to either update the instructions for svga or drop it altogether in the next gnuplot version if there is a better alternative.

     
  • Ethan Merritt

    Ethan Merritt - 2018-08-07

    I just had to try...
    Yes, it works to install yaft and run gnuplot with no special configuration needed for either.
    I cloned yaft from the GitHub repository and ran "make". I then opened a console session, logged in as root, and ran yaft. From inside yaft I ran gnuplot and said "set term sixel". It all worked nicely. The reason for running as root was to be able to access /dev/fb0. If I were going to do this routinely I'd look into changing the permissions so that it works for non-root.

    So my recommendation is yaft + sixel graphics. There may well be other console replacements similar to yaft. I didn't look that hard. But even one such means that svgalib and a special terminal are not needed.

    cheers!

     
    • Bastian Märkisch

      Indeed, yaft seems to be a good solution - it builds easily on a LUbuntu 16.04 system, too.
      So far I could not find an alternative which supports sixel graphics.

      I gave svgalib a try, too, but without success so far. All I can say is that building it for a recent kernel is not straightforward. ArchLinux provides patches up to 2.6.26, Gentoo up to 3.9. Still, the svgalib kernel module won't build for kernel 4.13/4.15. It may be that other distros have patches for newer kernels.

      So I fully second your recommendation of yaft + sixel.

       
  • Thomas Axmann

    Thomas Axmann - 2018-08-08

    Thanks for the good alternative this is a big help.

    To answer the questions:
    I basically use my computer for two things:

    • work: terminal-emulator (terminator because of the cool terminal multiplexing feature), evince and gpicview for looking at plots (or the x11 terminal), evince and firefox for looking at docs.
    • off-duty: firefox for streaming, vlc for music, sometimes games.

    I don't see a plus in having X running in the work env, because all of those things could be run from a linux console (given appropriate tools like lynx and poppler-utils).
    This is why i was planning on setting up two envs; working env: pure console, off-duty env: something like a media-center.

    The try on installing the svga terminal was just something that i thought to maybe work because i didn't know any better. Turns out (apt search vga) that there is no svgalib in the ubuntu repositories so i searched the web for it and found the source i gave (should have searched harder, 20 years is much years).
    Your comments are a big help (again thanks a lot! @Ethan Merritt) bc now that i know about yaft i'm pretty sure my planned yaft+tmux work env won't turn to be ugly at all.

    I think too that svga&linux terminals could be closed for support since there is an alternative and the required svgalib is not accessible (for presumably 99% of gnuplots userbase).

     
  • Thomas Axmann

    Thomas Axmann - 2018-08-08

    I, too, was able to try it out now. I had to rebuild gnuplot from source bc the sixel term wasn't installed (was easy enough) and of course i had to install yaft/yaftx from source (their README.md is pretty instructive). To make everything work i had to set the background color in the sixel terminal bc it seemingly took the same color as my graph had. For that i had to set object rectangle from screen 0,0 to screen 1,1 fs solid fc rgb 0xffffff behind bc sixel doesn't support set term sixel ***background rgb 0xffffff***.

     
    • Ethan Merritt

      Ethan Merritt - 2018-08-08

      Two of the gnuplot terminals support sixel output, tek.trm and gd.trm. The gd version has more features. It requires prior installation of libgd.

       Syntax:
             set terminal sixelgd
                    {{no}enhanced} {{no}truecolor}
                    {{no}transparent} {rounded|butt}
                    {linewidth <lw>} {dashlength <dl>}
                    {tiny | small | medium | large | giant}
                    {font "<face> {,<pointsize>}"} {fontscale <scale>}
                    {size <x>,<y>} {{no}crop} {animate}
                    {background <rgb_color>}
      
       

Log in to post a comment.