From: sfeam <sf...@us...> - 2018-08-09 17:28:19
|
This proposed action is triggered by a recent support request for use of gnuplot from the linux console command line (no X11 present). Please contribute any comments or anecdotes about using gnuplot from the linux console. Proposed action =============== Version 5.2: Mark both terminals DEPRECATED Version 5.3: Remove the configuration option --with-linux-vga Remove linux.trm and vgagl.trm from the current source Background ========== Both the "linux" and "vgagl" terminals rely on gnuplot being able to write directly to the system graphics device (/dev/vga or /dev/svga or /dev/console or various other synonyms). This is accomplished by calling into libraries libvga or libsvga (both are provided by the svgalib source). The gnuplot executable must be installed suid root so that it has sufficient privilege for this to work. A corresponding linux kernel module svgalib_helper must be available and loaded into the kernel. This was reasonable 20 years ago; now, not so much. Nothing in a typical modern linux system requires or uses svgalib and most distros do not include it by default. It is not clear that it is even possible to build it from existing source to work with current linux kernels. I have not been able to get it to work since gnuplot version 4.2 ten years ago, although I have not really tried very hard. The gnuplot core routines supporting pm3d color had an alternative code path controlled by #ifdef EXTENDED_COLOR_SPECS that affected all terminals if the linux vgagl terminal was configured. This code path has not been maintained and no longer works in 5.3 so I removed it. That means currently the vgagl terminal would not compile even if a working svgalib were available. Replacement =========== "set term dumb" is an option of course, but we can do better. Various terminal interfaces can be run at the linux console level. At least one of these (yaft) supports sixel graphics. Therefore one way to run gnuplot from the linux console is to run yaft (https://github.com/uobikiemukot/yaft) as your console interface, run gnuplot from the yaft command line, and select "set term sixel" for output. I was able to do this successfully on a laptop running linux kernel 4.17 and no special configuration of either yaft or gnuplot. This seems an adequate replacement for the original vgagl terminal, although neither of the current gnuplot sixel output modes supports mousing. |