Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192432 - sys-apps/shadow: Patch to make su -l preserve COLORTERM env var
Summary: sys-apps/shadow: Patch to make su -l preserve COLORTERM env var
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-13 15:08 UTC by srrijkers
Modified: 2009-02-11 02:53 UTC (History)
0 users

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


Attachments
shadow-4.0.18.1-su-preserve-colorterm.patch (shadow-4.0.18.1-su-preserve-colorterm.patch,407 bytes, patch)
2007-09-13 15:09 UTC, srrijkers
Details | Diff
shadow-4.0.18.1-su-preserve-variables.patch (shadow-4.0.18.1-su-preserve-variables.patch,538 bytes, patch)
2007-09-16 12:19 UTC, srrijkers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description srrijkers 2007-09-13 15:08:42 UTC
For some terminals COLORTERM seems to be the only way for checking for that specific terminal. For instance, gnome-terminal sets its TERM as "xterm" but its COLORTERM as "gnome-terminal". The COLORTERM variable is also of use when running GNU screen since it sets TERM to "screen" but doesn't touch COLORTERM.

Currently su -l only preserves the TERM variable, COLORTERM is unset. This simple patch makes su -l preserve the COLORTERM environment variable as well.
Comment 1 srrijkers 2007-09-13 15:09:55 UTC
Created attachment 130837 [details, diff]
shadow-4.0.18.1-su-preserve-colorterm.patch
Comment 2 srrijkers 2007-09-16 12:18:59 UTC
I've attached another patch which incorporates the previous one and preserves the STY and WINDOW environment vars as well. These are set by GNU screen and provide a way to query the session name and window number respectively. Like with the COLORTERM variable, I don't know of any other way to query this information which makes these variables invaluable.
Comment 3 srrijkers 2007-09-16 12:19:44 UTC
Created attachment 131040 [details, diff]
shadow-4.0.18.1-su-preserve-variables.patch
Comment 4 SpanKY gentoo-dev 2009-02-11 02:53:44 UTC
this has been merged upstream