screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to start screen from .bashrc


From: Buddy Burden
Subject: Re: how to start screen from .bashrc
Date: Thu, 28 Sep 2006 17:42:14 -0400
User-agent: Thunderbird 1.5.0.7 (X11/20060927)

Henrey/Peder,

You wouldn't by chance have a translation for that into "csh",
would you?

Long time since I used csh (or tcsh), but I guess something like:

if ("$STY" != "") then
   exec screen -dR
endif

I would do it thusly:

if ( $?STY ) then
        screen -x
endif

I've always preferred -x to -dR; just seems to work better. I wouldn't necessarily favor the "exec" approach because then your login shell morphs into your screen session. I suppose that could be desireable in certain circumstances, but if you do that then whenever you detach your screen it logs you out, which might not always be what you want. It's especially annoying if you decide you didn't want to be in screen after all. :)

Although I've played with having screen automatically start in my .login, these days I just have my "screen -x" command aliased to something short and sweet (I like "sr", for "screen resume"). Then I just log in and _usually_ immediately type "sr". But I can choose not to if that's not convenient.

One big reason that I stopped doing this is that if I ssh into another box and then end up ssh'ing back to my original machine, I would end up having a screen running inside a screen, which is always confusing. YMMV of course.


                -- Buddy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]