screen-users
[Top][All Lists]
Advanced

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

Re: creating a screen with multiple windows when starting a screen


From: Stephane Chazelas
Subject: Re: creating a screen with multiple windows when starting a screen
Date: Sat, 22 Apr 2006 01:28:11 +0100
User-agent: Mutt/1.5.6i

On Fri, Apr 21, 2006 at 05:15:10PM -0700, address@hidden wrote:
> 
> > Ugur ASLAN <address@hidden> said
> >             (on Sat, Apr 22, 2006 at 02:41:05AM +0300):
> > > I can't find a way to create all windows with given titles when
> > > starting a screen. And I can't make screen run a command in a
> > > specified window when creating it. Is it possible to write a bash
> > > script does the stuff I explained above at start?
> > 
> > You can do this by creating a .screenrc file (in your home
> > directory) with the necessary screen commands in it, so all the
> > windows are created automatically when a screen session is started.
> > 
> > For instance, these lines are taken from my .screenrc file:
> > 
> > screen -t mail      2       mutt
> > screen -t xt        21      su - root -c "xtail /var/log"
> > screen -t bbc       30      lynx http://news.bbc.co.uk/1/low.html
> > screen -t irc       0       irc Mynick
> 
> Maybe you also know how to do this so that, if the luser
> quits one of these, that window will stay open with a shell
> prompt..?
[...]

screen -t mail 2 sh -c 'mutt; exec "${SHELL-zsh}"'

or:

screen -t mail 2
at mail stuff "mutt\015"

(untested).

-- 
Stéphane




reply via email to

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