I am trying to find a way to dynamically set bash environment settings depending on the environment I am logging in from.
Opening a Terminal session from the xfce GUI, it would load a "default" (lack of a better word)
.bash_profilewith my basic environment settings
Connecting via SSH from another FreeBSD (or Linux) machine would also use that "default"
Connecting via SSH from my Mac would add additional settings (i.e. iTerm2 shell integration, for example)
I thought of testing for the environment variable
SSH_CLIENT but that would change depending on what DHCP address my machine was I ssh'ing from got that day.
Is there a way to determine what the remote machine's platform is and then process
If I can't "self contain" it within
.bash_profile, is there something I can "send" that will enabled me to do this?