<div class="gmail_quote">On Mon, Aug 29, 2011 at 9:40 AM, Barry Von Ahsen <span dir="ltr"><<a href="mailto:barry@vonahsen.com">barry@vonahsen.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

screen -dRR -S yourtitlehere<br>
<br>
in your .bash_profile<br><br></blockquote><div>I don't really use bash_profile, instead preferring a check for interactivity in a monolithic .bashrc.</div><div><br></div><div>At the bottom of my bashrc, I have this:</div>

<div><br></div><div># automatically invoke screen if we're not in a session already</div><div>if [ -x `which screen` ] && [ "$TERM" != "screen" ] && [ "$DISPLAY" != ":0" ] && [ "$DISPLAY" != ":0.0" ]; then</div>

<div>    # -xRR will attach without detaching other sessions</div><div>    screen -xRR</div><div>fi</div><div><br></div><div>The $DISPLAY checks are because I usually don't want screen in a local xterm (well, Konsole) session. </div>

</div>