[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting up a screen session from a script?
From: |
Jonathan del Strother |
Subject: |
Setting up a screen session from a script? |
Date: |
Thu, 16 Mar 2006 23:47:10 +0000 |
I'm trying to come up with a convenience-script to set up a Rails
editing environment using screen. It looks something like this :
#!/bin/sh
cd /Users/jon/Developer/Rails
screen -c /Users/jon/.screenrc_rails
So, that just changes into my Rails directory, then launches screen
with the custom config file .screenrc_rails. That file looks like this:
source /Users/jon/.screenrc
screen -t Server 0 script/server
screen -t Console 1 script/console
screen 2
Which loads the usual .screenrc presets, then creates a few different
windows running server & console processes, and finally leaves me in
a blank window ready for me to do stuff.
That works great if I run the command from a screen-less bash
session. However, if I'm already running within a screen session,
"screen -c /Users/jon/.screenrc_rails" just spawns a single new
window and ignores the config file.
Any suggestions? What's the best way of getting this script to
produce the right setup, regardless of the environment it's initially
run in?
Thanks,
Jon
smime.p7s
Description: S/MIME cryptographic signature
- Setting up a screen session from a script?,
Jonathan del Strother <=