[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Where does $TERM come from?
From: |
Andrew Miller |
Subject: |
Re: [Help-bash] Where does $TERM come from? |
Date: |
Sun, 21 Jun 2015 03:50:36 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Greg Wooledge <address@hidden> writes:
> Bash inherits it from its parent process, which is typically one of:
>
> * an X terminal emulator like xterm
> * a terminal multiplexer like screen or tmux
> * the getty/login team on a serial connection or operating system console
> * sshd, which in turn gets TERM from the ssh remote client
Does bash save the ancestral PID somewhere?
To explain what I mean, this works:
$ readlink /proc/$PPID/exe
/usr/bin/tmux
$ echo $TERM
screen
But this doesn't:
$ sudo bash
# readlink /proc/$PPID/exe
/usr/bin/sudo
# echo $TERM
screen
- [Help-bash] Where does $TERM come from?, Peng Yu, 2015/06/11
- Re: [Help-bash] Where does $TERM come from?, Greg Wooledge, 2015/06/11
- Re: [Help-bash] Where does $TERM come from?,
Andrew Miller <=
- [Help-bash] How to determine the parent's parent (Was: Re: Where does $TERM come from?), Eduardo A . Bustamante López, 2015/06/21
- Re: [Help-bash] How to determine the parent's parent (Was: Re: Where does $TERM come from?), Andrew Miller, 2015/06/21
- Re: [Help-bash] How to determine the parent's parent (Was: Re: Where does $TERM come from?), Dennis Williamson, 2015/06/21
- Re: [Help-bash] How to determine the parent's parent (Was: Re: Where does $TERM come from?), Chris F.A. Johnson, 2015/06/21
- Re: [Help-bash] How to determine the parent's parent (Was: Re: Where does $TERM come from?), Chris F.A. Johnson, 2015/06/21
- Re: [Help-bash] Where does $TERM come from?, Greg Wooledge, 2015/06/22