Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345863 - app-misc/screen imposes strange limit on the length of $TERM
Summary: app-misc/screen imposes strange limit on the length of $TERM
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Sven Wegener
URL: http://savannah.gnu.org/bugs/?30880
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 11:03 UTC by Stelian Ionescu
Modified: 2010-12-08 21:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Raise the length of d_termnane to NAME_MAX (4.0.3-extend-d_termname.patch,774 bytes, patch)
2010-11-17 11:04 UTC, Stelian Ionescu
Details | Diff
Patch better suited for upstream, should compile on BSDs too (4.0.3-extend-d_termname.patch,895 bytes, patch)
2010-11-17 12:20 UTC, Stelian Ionescu
Details | Diff
Fix typo in last patch (4.0.3-extend-d_termname.patch,896 bytes, patch)
2010-11-17 12:21 UTC, Stelian Ionescu
Details | Diff
Fix hardcoded size of TERM in another place as well (4.0.3-extend-d_termname.patch,1.37 KB, patch)
2010-11-17 16:29 UTC, Stelian Ionescu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stelian Ionescu 2010-11-17 11:03:25 UTC
In display.h, d_termname is limited to 20 characters(plus the ending NUL) and rxvt-unicode-256color(installed by sys-libs/ncurses) has 21 characters.
Comment 1 Stelian Ionescu 2010-11-17 11:04:09 UTC
Created attachment 254617 [details, diff]
Raise the length of d_termnane to NAME_MAX
Comment 2 Stelian Ionescu 2010-11-17 11:06:48 UTC
Comment on attachment 254617 [details, diff]
Raise the length of d_termnane to NAME_MAX

If strlen(getenv("TERM)) > sizeof(d_termname), screen refuses to start. I've rebuilt screen with that patch and it seems to work
Comment 3 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-11-17 12:07:27 UTC
Stelian,  thanks for your report. This should go upstream too.
Comment 4 Stelian Ionescu 2010-11-17 12:20:08 UTC
Created attachment 254625 [details, diff]
Patch better suited for upstream, should compile on BSDs too
Comment 5 Stelian Ionescu 2010-11-17 12:21:30 UTC
Created attachment 254627 [details, diff]
Fix typo in last patch
Comment 6 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-11-17 13:16:34 UTC
Might be similar to:
http://savannah.gnu.org/bugs/?30880
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2010-11-17 14:51:12 UTC
+*screen-4.0.3-r2 (17 Nov 2010)
+
+  17 Nov 2010; Justin Lecher <jlec@gentoo.org>
+  +files/4.0.3-extend-d_termname.patch, screen-4.0.3.ebuild,
+  +screen-4.0.3-r2.ebuild:
+  Fix for long names in TERM, thanks Stelian Ionescu #345863
+
Comment 8 Stelian Ionescu 2010-11-17 16:29:45 UTC
Created attachment 254669 [details, diff]
Fix hardcoded size of TERM in another place as well

As noticed in the Savannah bug, there was another place in the source code where the terminal name was being copied, so I updated that too
Comment 9 Stelian Ionescu 2010-11-17 16:36:25 UTC
Sorry for missing that one
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2010-12-08 18:21:50 UTC
Is this fixed now?
Comment 11 Stelian Ionescu 2010-12-08 21:43:42 UTC
Yes, works here
Comment 12 Justin Lecher (RETIRED) gentoo-dev 2010-12-08 21:45:15 UTC
Thanks closing then.