branching in screenrc?

View: New views
3 Messages — Rating Filter:   Alert me  

branching in screenrc?

by Aaron Davies-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

any support for any "if" branching in screenrc's? i two windows boxes
using a common (network-based) homedir, and i want screen to start two
completely different sets of ssh sessions depending on which box it's
executed on. i suppose i can allias screen to "screen -c
.screenrc.`hostname` or something, but a.) that's clumsy and b.) it
doesn't easily handle any common settings between the two. hmm. can
screenrc's include other files? can it be read from stdin? ("screen -c
-" or "screen -c /dev/stdin" or something?) then i could say "cat
.screenrc .screenrc.`hostname` | screen -c -". or maybe there's some
other way to just do the actual variant part (create various
screens)--execute a shell script or something, and let that handle the
branching. thoughts?
--
Aaron Davies
aaron.davies@...


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: branching in screenrc?

by Tom Scogland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Including is how I do this, in fact the following is from my screenrc.

source ${HOME}/.screenrc-${TERM}

On Fri, Sep 5, 2008 at 1:33 AM, Aaron Davies <aaron.davies@...> wrote:
any support for any "if" branching in screenrc's? i two windows boxes
using a common (network-based) homedir, and i want screen to start two
completely different sets of ssh sessions depending on which box it's
executed on. i suppose i can allias screen to "screen -c
.screenrc.`hostname` or something, but a.) that's clumsy and b.) it
doesn't easily handle any common settings between the two. hmm. can
screenrc's include other files? can it be read from stdin? ("screen -c
-" or "screen -c /dev/stdin" or something?) then i could say "cat
.screenrc .screenrc.`hostname` | screen -c -". or maybe there's some
other way to just do the actual variant part (create various
screens)--execute a shell script or something, and let that handle the
branching. thoughts?
--
Aaron Davies
aaron.davies@...


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users



--
-N
AKA:Tom Scogland
I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.
-Albert Einstein

_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: branching in screenrc?

by Aaron Davies-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

finally got round to trying this, and i'm having some problems

it's reading the file, and i can see the connections come up, but they
disappear after a second or two

the commands in the box-specific .screenrc file are just ordinary
"screen" commands of the general form "screen -t <title> ssh <host>",
and they all work fine when type/pasted directly into the shell

:source'ing the file has the same effect tho--they come up for a sec,
then go down

ideas?

On Fri, Sep 5, 2008 at 1:37 PM, Tom Scogland <njustn@...> wrote:

> Including is how I do this, in fact the following is from my screenrc.
> source ${HOME}/.screenrc-${TERM}
>
> On Fri, Sep 5, 2008 at 1:33 AM, Aaron Davies <aaron.davies@...> wrote:
>>
>> any support for any "if" branching in screenrc's? i two windows boxes
>> using a common (network-based) homedir, and i want screen to start two
>> completely different sets of ssh sessions depending on which box it's
>> executed on. i suppose i can allias screen to "screen -c
>> .screenrc.`hostname` or something, but a.) that's clumsy and b.) it
>> doesn't easily handle any common settings between the two. hmm. can
>> screenrc's include other files? can it be read from stdin? ("screen -c
>> -" or "screen -c /dev/stdin" or something?) then i could say "cat
>> .screenrc .screenrc.`hostname` | screen -c -". or maybe there's some
>> other way to just do the actual variant part (create various
>> screens)--execute a shell script or something, and let that handle the
>> branching. thoughts?
>> --
>> Aaron Davies
>> aaron.davies@...
>>
>>
>> _______________________________________________
>> screen-users mailing list
>> screen-users@...
>> http://lists.gnu.org/mailman/listinfo/screen-users
>
>
>
> --
> -N
> AKA:Tom Scogland
> I am enough of an artist to draw freely upon my imagination. Imagination is
> more important than knowledge. Knowledge is limited. Imagination encircles
> the world.
> -Albert Einstein
>



--
Aaron Davies
aaron.davies@...


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users
LightInTheBox - Buy quality products at wholesale price!