Subject: Apps creating new windows?

From: "Dan Mahoney, System Admin" <[email-masked]>
Date: Mon, 28 Jul 2008 22:10:18 -0400 (EDT)

Hey all,

Is there ANY implementation at all, for when an app is running under 
screen, for it to be able to launch a "new window" (for example, to view 
an attachment in pine, to start a /query in irc, to view a file in MC)...

I'm not asking if this functionality exists in those programs, but if 
there's a simple way of implementing it (i.e. if the calls exist, etc).

-Dan Mahoney

-- 

"If you aren't going to try something, then we might as well just be
friends."

"We can't have that now, can we?"

-SK & Dan Mahoney,  December 9, 1998

--------Dan Mahoney--------
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---------------------------

_______________________________________________
screen-users mailing list
[email-masked]
http://lists.gnu.org/mailman/listinfo/screen-users

---

From: "Trent W. Buck" <[email-masked]>
Date: Tue, 29 Jul 2008 12:35:52 +1000

On Mon, Jul 28, 2008 at 10:10:18PM -0400, Dan Mahoney, System Admin wrote:
> screen, for it to be able to launch a "new window" (for example, to
> view an attachment in pine, to start a /query in irc, to view a file
> in MC)...
>
> I'm not asking if this functionality exists in those programs, but
> if there's a simple way of implementing it (i.e. if the calls exist,
> etc).

There is: have your program run "screen foo" to start the app "foo" on
a new screen window.  Because $STY is set within screen, your
invocation "screen foo" creates a new window instead of a new session.

Unfortunately, this use case for screen is horribly broken if you want
to create the new window from within a script (e.g. an Emacs key
binding), because "screen foo" still checks if there is a controlling
terminal -- even though in this case it doesn't need one.  I get
around this by instead running "xterm -e screen foo", which causes a
second xterm to pop up for a second.  This is a really evil and
unpleasant kludge, and it makes me sad.

Further reading: http://bugs.debian.org/461107

---

From: Phil! Gregory <[email-masked]>
Date: Tue, 29 Jul 2008 12:13:34 -0400

> an attachment in pine, to start a /query in irc, to view a file in MC)...

I believe BitchX can do this, although its multiwindow code is pretty
buggy in its own right.  You could probably get some ideas on how to
implement it yourself from looking at the BitchX source code, though.

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
I can just see it now: nomination-terrorism ;-)
                       -- Manoj
haha!  i nominate manoj.
                       -- seeS
---- --- --

---

From: Michael Parson <[email-masked]>
Date: Thu, 31 Jul 2008 13:13:26 -0500 (CDT)

On Mon, 28 Jul 2008, Dan Mahoney, System Admin wrote:

> Hey all,
>
> Is there ANY implementation at all, for when an app is running under screen, 
> for it to be able to launch a "new window" (for example, to view an 
> attachment in pine, to start a /query in irc, to view a file in MC)...

I know the links web browser (not lynx), can open a link in a new screen
window.  Looking at ps output, it looks like it runs another instance of
links, so it probably does the equiv of

:screen links $newurl

> I'm not asking if this functionality exists in those programs, but if there's 
> a simple way of implementing it (i.e. if the calls exist, etc).
>
> -Dan Mahoney

-- 
Michael Parson
[email-masked]

---

From: Juergen Weigert <[email-masked]>
Date: Fri, 1 Aug 2008 19:46:18 +0200

> >an attachment in pine, to start a /query in irc, to view a file in MC)...

man screen says:
[...] new windows can be created by running a command like:

        screen emacs prog.c

from a shell prompt within a previously created window.  This will not run
another copy of screen, but will instead  supply the command name and its
arguments to the window manager (specified in the $STY environment
variable) who will use it to create the new window.  The above example
would start the emacs editor (editing prog.c) and switch to its window.

> >there's a simple way of implementing it (i.e. if the calls exist, etc).

The answer is yes.
Although it is not the API call you may now want to implement, It is 
a simple command line call.  

        cheers,
                Jw.

-- 
 o \  Juergen Weigert      unix-software __/ _=======.=======_     
<V> | [email-masked]         creator    __/        _---|____________\/    
 \  |            0179/2069677      __/          (____/            /\
(/) | ____________________________/              _/ \_ vim:set sw=2 wm=8

---

From: Christian Ebert <[email-masked]>
Date: Tue, 5 Aug 2008 16:59:21 +0200

* Trent W. Buck on Tuesday, July 29, 2008 at 12:35:52 +1000
> unpleasant kludge, and it makes me sad.

I might be wrong, but it sounds like you could achieve this with:
"screen -X screen foo".

c
-- 
  Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_  _V I D E O S_  -->>  http://www.blacktrash.org/underdogma/

---

From: "Trent W. Buck" <[email-masked]>
Date: Wed, 6 Aug 2008 02:32:19 +1000

> I might be wrong, but it sounds like you could achieve this with:

The part where -X is incompatible with :password (in the bug report,
but not reproduced in the post itself).