screenenv is a simple gadget to be used together with GNU Screen.
It will make applications running within screen see some environment
variables from the currently active screen client, not based on the
first attached screen client. This enables applications to use
the appropriate X display, SSH agent forwarding settings, etc.
Consider the situation: You have a screen session, originally started
on a local desktop; later, you attach it over ssh as well (with X
forwarding enabled). Now you do your happy mutt mail-reading, but
stumble over an image attachment. If you try to open it over ssh,
the picture will show up on your local display, not the ssh-forwarded
one.
But if you preload screenenv, applications trying to use X will
automatically choose the appropriate $DISPLAY based on the session
with the least idle time!