25 May 2012 06:41
Re: Bashrc distinguish between mintty and x-windows xterm
Andrew Hancock <andymhancock <at> gmail.com>
2012-05-25 04:41:54 GMT
2012-05-25 04:41:54 GMT
Buchbinder, Barry (NIH/NIAID) [E] <BBuchbinder <at> niaid.nih.gov> writes:
>
> # Only set ThisTerm if not set.
> if [ -z "${ThisTerm}" ]
> then
> if [ ${PPID} = 1 ]
> then
> ThisTerm=cmd
> else
> if [ "$(cat /proc/${PPID}/exename)" = '/usr/bin/mintty' ]
> then
> ThisTerm=mintty
> else
> # not minty, not cmd, so xterm
> ThisTerm=xterm
> fi
> fi
> fi
>
> Then set colors by the value of ThisTerm.
Barry, it works flawlessly. Thanks immensely!
RSS Feed