Re: Great SWT Program
On Nov 21, 12:05 pm, twerpina...@gmail.com wrote:
On Nov 19, 5:53 am, b...@pvv.ntnu.no (Bent C Dalager) wrote:
You misunderstand me -- deliberately again, I expect.
When I start up screen, it automatically launches five applications in
different screen windows.
Consider web browsers. Ordinarily people will go to different sites or
do different things each time they run one, so the most logical
starting point is either a blank page or a search engine, particularly
Google. Yet they tend to come out-of-the-box configured to go
someplace else, such as MSN or such, generally a site affiliated with
the browser's maker. But I don't see such behavior benefiting screen's
developers somehow, so having it go to five pre-programmed places
seems senseless. And from a user standpoint, it should just start up a
single internal terminal with a command prompt and wait for the user
to decide what else it is to do. In fact I'm fairly sure this is
exactly the behavior I observed with an older version of it some time
in the past, so opening five terminals automatically and launching
specific processes that aren't the system command interpreter in each
of them must be something relatively recent.
The even stranger thing is that this being unix-type software it
should be more configurable. I can configure Firefox for any desired
start page or to start up with particular sites in tabs, though there
isn't much point, since a single blank tab will do, pending my
choosing a bookmark or using the google box in the upper right corner
to launch a search. Likewise it should be possible for you to
reconfigure screen to start up with only a single session open on a
command prompt in your home directory, a central point that's
reasonably convenient no matter what you plan to do today. Yet you
haven't done this, so unless you always do the exact same thing all of
the time, this would seem to indicate that it's stuck behaving the way
The previous two paragraphs have no bearing on screen as it actually
exists whatsoever, since the behaviour Bent describes is exactly that
available through screen's configuration files and is not screen's
I'm reasonably sure you already knew that.
(I wouldn't be surprised in the least if one of the programs Bent's
configured screen to launch automatically is a shell, or emacs with a
*shell* buffer open.)
"screen vi blah.txt" will launch "vi blah.txt" in a new window.
Eh? Nesting screen instances?
Running screen from within a screen instance causes a new session to
be added to the existing screen instance, not a new screen instance to
be created. That was his point. The "run the passed command"
behaviour that screen has when launched (eg., "screen vi" from outside
screen will create a session with one screen and run "vi" in it)
carries over to running screen from within a screen instance, so the
newly created screen will be a peer to the one that launched it, and
will start up running "vi blah.txt".
Screen sets environment variables on the sessions created within it
allowing any software speaking the screen protocol to locate the
correct (unix-domain, not network) socket to control the screen with.
For programs that are not themselves aware of screen but can run
arbitrary commands, like vi and emacs, you can run "screen <commmand>"
to place the command in a new session in the same instance.
Of course there's another problem with screen: it captures some
keystrokes that might also be bound in other applications. ISTR C-w
being one of these, used for its version of alt-tab. So much for using
C-w in emacs then, eh?
Screen only captures C-a. I have remapped this to C-v since I like to
use C-a in emacs. The installation you used may have been configured
to capture C-w of course.
Still got to pick something.
Fortunately, you can pass the keystroke the attention sequence
replaced on to the current screen just fine: with the default
attention sequence (C-a), the keystroke C-a a sends C-a to the active
screen. I don't care to check the docs to see if Bent's preferred C-v
means that he'd have to hit C-v a or C-v v; I'm sure he can tell you
if you ask though.