1 |
This may be a safer bet... |
2 |
|
3 |
if [ -z "$STY" ]; then |
4 |
exec screen -d -R |
5 |
fi |
6 |
|
7 |
I haven't tested it though so use it at your own risk. :-) |
8 |
|
9 |
Max |
10 |
|
11 |
|
12 |
On Wed, 2006-09-06 at 13:25 -1000, Ben Munat wrote: |
13 |
> Yikes... guess I gotta be careful with what I add to my .bashrc... added |
14 |
> this to root's .bashrc and locked myself out of my system! |
15 |
> |
16 |
> Before I exited (and then couldn't reconnect) I looked at ps -e and |
17 |
> there were hundreds of screen/bash processes... something went haywire. |
18 |
> |
19 |
> Managed to rm the .bashrc with ssh ... rm .bashrc but still had to |
20 |
> reboot to login... even restarting sshd (via webmin) didn't do the trick. |
21 |
> |
22 |
> So a warning to anyone who sees the previous message and tries it... do |
23 |
> it on a local machine first (I went straight for root on my remote |
24 |
> server... :-O) |
25 |
> |
26 |
> b |
27 |
> |
28 |
> Christian Spoo wrote: |
29 |
> > Ben Munat schrieb: |
30 |
> >> Well, I think the response is overwhelmingly clear: screen! |
31 |
> >> |
32 |
> >> I just wanted to add my 2 cents that I absolutely love screen... it has |
33 |
> >> saved my ass countless times. The only problem is remembering to run it |
34 |
> >> on login before starting the emerge. I suppose I really should look into |
35 |
> >> getting bash to run it for me automatically. Anyone got a script for that? |
36 |
> > |
37 |
> > How about adding a |
38 |
> > |
39 |
> > screen -A -m -d -S <your screen name> /bin/bash |
40 |
> > |
41 |
> > to your ~/.bashrc ? |
42 |
|
43 |
-- |
44 |
gentoo-server@g.o mailing list |