Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to access a screen session?

Reply
Thread Tools

How to access a screen session?

 
 
Alexander Newald
Guest
Posts: n/a
 
      01-02-2004
Hello,

is their any way to access a screen session and output the content of the
session with perl.

In addition I wonder if it is possible to send back an input to the screen
session making a perl program be "interactive" with the screen.

Thanks,

Alexander Newald


 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      01-02-2004
Alexander Newald wrote:
> is their any way to access a screen session and output the content of
> the session with perl.


Please define "screen session". At least I am not familiar with this term.

jue


 
Reply With Quote
 
 
 
 
Alexander Newald
Guest
Posts: n/a
 
      01-02-2004
"Jürgen Exner" <(E-Mail Removed)> schrieb im Newsbeitrag
news:eBhJb.17886$(E-Mail Removed)...
> Alexander Newald wrote:
> > is their any way to access a screen session and output the content of
> > the session with perl.


> Please define "screen session". At least I am not familiar with this term.


Sorry that I did not provide all information that my be needed.

I use a linux box and for linux a little program exist that is called
screen. You can start any other programm with it and get a "screen" that is
like a virtual console for your normal text console. You can detach and
attach these screens within one ssh connection for example. These screens
will even be running if you close the ssh session from within you started
them.

At least I like to get the content of one of these detached screens with
perl and write this content to a file or better webpage.

Alexander Newald


 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      01-02-2004
"Alexander Newald" <(E-Mail Removed)> writes:

> "Jürgen Exner" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:eBhJb.17886$(E-Mail Removed)...
> > Alexander Newald wrote:
> > > is their any way to access a screen session and output the content of
> > > the session with perl.

>
> > Please define "screen session". At least I am not familiar with this term.

>
> Sorry that I did not provide all information that my be needed.
>
> I use a linux box and for linux a little program exist that is called
> screen. You can start any other programm with it and get a "screen" that is
> like a virtual console for your normal text console. You can detach and
> attach these screens within one ssh connection for example. These screens
> will even be running if you close the ssh session from within you started
> them.
>
> At least I like to get the content of one of these detached screens with
> perl and write this content to a file or better webpage.


Your question has very little to do with Perl and very much to do with
screen.

From a quick glance at the GNU screen manpage then there does appear
be a command to dump the state of a virtual screen to a file
("hardcopy") but I can't see how to tell it to do so for a detached
sesson from the command line.

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
Reply With Quote
 
Malcolm Dew-Jones
Guest
Posts: n/a
 
      01-02-2004
Alexander Newald ((E-Mail Removed)) wrote:
: Hello,

: is their any way to access a screen session and output the content of the
: session with perl.

: In addition I wonder if it is possible to send back an input to the screen
: session making a perl program be "interactive" with the screen.

Could `expect' do anything useful in this situation?

Perl has an expect module, (it might be called Expect.pm or such like).
 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      01-03-2004

http://www.velocityreviews.com/forums/(E-Mail Removed) (Malcolm Dew-Jones) wrote:
> Alexander Newald ((E-Mail Removed)) wrote:
> : Hello,
>
> : is their any way to access a screen session and output the content of the
> : session with perl.
>
> : In addition I wonder if it is possible to send back an input to the screen
> : session making a perl program be "interactive" with the screen.
>
> Could `expect' do anything useful in this situation?
>
> Perl has an expect module, (it might be called Expect.pm or such like).


Even if it doesn't, the standard answer to this sort of question is
'use a pty'. This Is Nothing To Do With Perl .

Ben

--
We do not stop playing because we grow old;
we grow old because we stop playing.
(E-Mail Removed)
 
Reply With Quote
 
Michele Dondi
Guest
Posts: n/a
 
      01-04-2004
On Fri, 02 Jan 2004 17:09:30 GMT, "Jürgen Exner"
<(E-Mail Removed)> wrote:

>Alexander Newald wrote:
>> is their any way to access a screen session and output the content of
>> the session with perl.

>
>Please define "screen session". At least I am not familiar with this term.


screen is probably one of the most underestimated *nix utilitis and
indeed it would deserve to better known IMHO.

As far as the perl content of the OP is concerned... I just can't
answer!


Michele
--
# This prints: Just another Perl hacker,
seek DATA,15,0 and print q... <DATA>;
__END__
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Inspiron 3200 with No Bios Screen (only BLANK screen) opensource71 Computer Support 3 02-08-2004 05:08 PM
Passing User Values from screen to screen Russell ASP .Net 1 01-21-2004 01:56 AM
PC-screen freezes - checkered green line in top of the screen reply@newsgroup.please Computer Support 1 08-02-2003 06:36 AM
Screen shot or capture screen notthesamesam Computer Support 8 07-13-2003 03:21 AM



Advertisments