[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem in gnome terminal description
From: |
Alain Williams |
Subject: |
Re: Problem in gnome terminal description |
Date: |
Thu, 27 Jul 2017 16:46:13 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Sat, Jul 22, 2017 at 12:03:49PM -0400, Thomas Dickey wrote:
> On Thu, Jul 20, 2017 at 01:17:38PM +0100, Alain Williams wrote:
> > Hi,
> >
> > the entry for gnome appears to be wrong. The two entries and values:
> >
> > rmso=\E[m,
> > rmul=\E[m,
>
> I'm unsure about that (vidputs is "supposed" to allow for this sort of case).
Oh, one detail that I should have mentioned is that I am not using the curses
functions to output (draw the screen). My code is quite old ... I only updated
it from termcap to terminfo earlier this year - to be able to get extended
sequences like shift-left-arrow (kLFT). It does its own screen drawing.
Thus I have been able to implement a workaround: if the strings returned by rmso
& rmul are the same, assume that both SO & UL are turned off and then correct
from there (ie switch one back of, if needed) - it works.
I attach a crude test file that you can 'cat' on a Gnome terminal, it will set
SO and UL both independently and together. It shows that \E[m will switch both
off.
It does the same thing on an Xterminal.
> I had an older "gnome" entry before VTE, and see that I "updated" it in
> September 2003, but took a closer look in July 2004 in reference to
>
> https://bugzilla.redhat.com/show_bug.cgi?id=122815
TERM=linux uses \E[27m & \E[24m
> However, I can add it (will test against vte-2012, and probably
> put the change there).
Thanks ... let me know when you have and I will raise a bug report at RedHat
that the need to update their terminfo files. (& Debian ... I'll see who needs
it).
BTW: an idea that has been knocking around my head for a while ...
consider/ignore as you see fit.
This was sparked off by the Gnome Terminal developers who insist of nailing in
TERM=xterm in spite of it not conforming to the spec (eg Shift-F1). Their
justification is that a system might not have a 'gnome' terminfo description but
will have an 'xterm' one.
It might be nice to accept that the $TERM value could contain a ':' separated
list of alternatives, in the manner of $PATH (or like $TERMPATH). The tgetent()
would use the first terminal that it finds.
Eg: TERM=gnome:xterm
This is backwards compatible and if you do not use a new $TERM changes nothing.
Since most programs will bring in libncurses via a shared object/library they
will accept the new syntax once their operating system receives an upgrade - ie
no need to recompile old programs.
The new syntax will, however, cause problems for scripts, shell or otherwise.
There are a few in /etc/profile.d/, also /etc/vimrc.
GNU emacs has /usr/share/emacs/23.1/lisp/term/
So: perhaps some symbol could be made available that gives the name of the
terminal
that was found/used. For shell scripts the tput program could have an option
that
gives the name of the terminal description that is used.
I suppose that other implementations of curses would need to buy in to this
idea; although if they do not then it should not be a show stopper - the
reluctant can always catch up later. This is an idea for the next 200 years more
than the next 2.
Thanks for reading.
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT
Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information:
http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>
TestUlSo-literal
Description: Text document