This may be a safer bet... if [ -z "$STY" ]; then exec screen -d -R fi
I haven't tested it though so use it at your own risk. :-) Max On Wed, 2006-09-06 at 13:25 -1000, Ben Munat wrote: > Yikes... guess I gotta be careful with what I add to my .bashrc... added > this to root's .bashrc and locked myself out of my system! > > Before I exited (and then couldn't reconnect) I looked at ps -e and > there were hundreds of screen/bash processes... something went haywire. > > Managed to rm the .bashrc with ssh ... rm .bashrc but still had to > reboot to login... even restarting sshd (via webmin) didn't do the trick. > > So a warning to anyone who sees the previous message and tries it... do > it on a local machine first (I went straight for root on my remote > server... :-O) > > b > > Christian Spoo wrote: > > Ben Munat schrieb: > >> Well, I think the response is overwhelmingly clear: screen! > >> > >> I just wanted to add my 2 cents that I absolutely love screen... it has > >> saved my ass countless times. The only problem is remembering to run it > >> on login before starting the emerge. I suppose I really should look into > >> getting bash to run it for me automatically. Anyone got a script for that? > > > > How about adding a > > > > screen -A -m -d -S <your screen name> /bin/bash > > > > to your ~/.bashrc ? -- [email protected] mailing list
