[Top][All Lists]

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

Re: How to use screen configuration with command option

From: Chris Jones
Subject: Re: How to use screen configuration with command option
Date: Mon, 28 Dec 2009 11:52:19 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Dec 28, 2009 at 11:19:42AM EST, Aaron Davies wrote:
> On Monday, December 28, 2009,  <address@hidden> wrote:


> >> Do you mean something like this:
> >>
> >> $ ssh address@hidden
> >> $ screen -S $HOSTNAME
> >> $ screen -S $HOSTNAME -X hardstatus alwayslastline "Hello World!"
> >> $ screen -S ..           <other screen command> ...
> >>
> >> And this is not working in your case..??
> >>
> >> CJ
> >
> > Hello CJ,
> >
> > [-X] is applicable for existing session only.
> The short answer afaik is that you cannot pass arbitrary options to a
> new screen session while starting it; you have to create a screen and
> then use -X to send commands to it.

His script creates a screen session, and if screen doesn't start, he
bails out. When screen does come up, he has an "existing session" and
so.. he can issue as many 'screen -X's as he wants, right?

Still not sure why he wants to do it that way, though.

> If this is a common problem, it might be worth looking at adding
> something like ssh's "-o key=value" syntax. The only problem I can
> forsee is that command lines could get ridiculously long…

But, I don't see why his script couldn't scp or whatever a generic
screenrc to the target system's /tmp directory, e.g., prior to invoking
screen and issue a 'screen -c /tmp/screenrc' and possibly remove it when
he's done. I mean, doesn't he have write access anywhere on his server's
file system..? Does that make sense?


reply via email to

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