Here is what I use in my .bash_login:
if screen -wipe 2>&1 | egrep -v "No Sockets found" >/dev/null; then
echo -n "Reattach to detached tree? (y/n) [space=y] "
read -n1 a;
if [[ ("$a" = "y") || ("$a" = "") ]]; then
exec screen -xRR
fi
echo ""
else
echo "type 'screen' to start screen"
fi
It's simple and effective and reminicent of the old TOPS-20 and ITS days.
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users