ports/162339: sysutils/screen: Unable to start screen when $TERM is longer than 20 characters
Momchil Ivanov
momchil at xaxo.eu
Sun Nov 6 18:40:11 UTC 2011
>Number: 162339
>Category: ports
>Synopsis: sysutils/screen: Unable to start screen when $TERM is longer than 20 characters
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Nov 06 18:40:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Momchil Ivanov
>Release:
>Organization:
>Environment:
>Description:
Unable to start screen when $TERM is longer than 20 characters, example TERM="rxvt-unicode-256color". It says "$TERM too long - sorry.". There is a bug report about this here http://savannah.gnu.org/bugs/?30880 and it is more than a year old. Inside there are links to patches, there are similar patches used on other projects: http://projects.archlinux.org/svntogit/packages.git/tree/screen/trunk/screen-4.0.3-long-term.patch
Since nothing happens with the source code of screen, I am attaching a fix that adds the patch to the sysutils/screen port. The buffer is made 31+1 long, this leaves some room for longer TERM variables, though the length is arbitrary.
>How-To-Repeat:
export TERM="rxvt-unicode-256color"
screen
>Fix:
Patch attached with submission follows:
Index: patch-long-term
===================================================================
--- patch-long-term (revision 0)
+++ patch-long-term (revision 1205)
@@ -0,0 +1,22 @@
+--- display.h 2011-11-06 10:23:29.000000000 +0100
++++ display.h 2011-11-06 19:05:33.000000000 +0100
+@@ -85,7 +85,7 @@
+ struct win *d_other; /* pointer to other window */
+ int d_nonblock; /* -1 don't block if obufmax reached */
+ /* >0: block after nonblock secs */
+- char d_termname[20 + 1]; /* $TERM */
++ char d_termname[31 + 1]; /* $TERM */
+ char *d_tentry; /* buffer for tgetstr */
+ char d_tcinited; /* termcap inited flag */
+ int d_width, d_height; /* width/height of the screen */
+--- screen.h 2011-11-06 10:23:29.000000000 +0100
++++ screen.h 2011-11-06 18:33:52.000000000 +0100
+@@ -204,7 +204,7 @@
+ char preselect[20];
+ int esc; /* his new escape character unless -1 */
+ int meta_esc; /* his new meta esc character unless -1 */
+- char envterm[20 + 1]; /* terminal type */
++ char envterm[31 + 1]; /* terminal type */
+ int encoding; /* encoding of display */
+ }
+ attach;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list