How to access a screen session?

  • Thread starter Alexander Newald
  • Start date
A

Alexander Newald

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
 
J

Jürgen Exner

Alexander said:
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
 
A

Alexander Newald

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
 
B

Brian McCauley

Alexander Newald said:
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\\
 
M

Malcolm Dew-Jones

Alexander Newald ([email protected]) 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).
 
B

Ben Morrow

Alexander Newald ([email protected]) 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
 
M

Michele Dondi

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top