Screen is just a process that spawns other processes, and like always those inherit environment variables. The script I have that starts screen defines a variable called "SESSION" beforehand, and that's used in my bashrc to set HISTFILE (and other things). Screen is just how I organize it.
reply