How to access a screen session?

Discussion in 'Perl Misc' started by Alexander Newald, Jan 2, 2004.

  1. 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
    Alexander Newald, Jan 2, 2004
    #1
    1. Advertising

  2. 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
    Jürgen Exner, Jan 2, 2004
    #2
    1. Advertising

  3. "Jürgen Exner" <> schrieb im Newsbeitrag
    news:eBhJb.17886$...
    > 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
    Alexander Newald, Jan 2, 2004
    #3
  4. "Alexander Newald" <> writes:

    > "Jürgen Exner" <> schrieb im Newsbeitrag
    > news:eBhJb.17886$...
    > > 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\\
    Brian McCauley, Jan 2, 2004
    #4
  5. Alexander Newald () 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).
    Malcolm Dew-Jones, Jan 2, 2004
    #5
  6. Alexander Newald

    Ben Morrow Guest

    (Malcolm Dew-Jones) wrote:
    > Alexander Newald () 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.
    Ben Morrow, Jan 3, 2004
    #6
  7. On Fri, 02 Jan 2004 17:09:30 GMT, "Jürgen Exner"
    <> 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__
    Michele Dondi, Jan 4, 2004
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russell
    Replies:
    1
    Views:
    366
    Steve C. Orr [MVP, MCSD]
    Jan 21, 2004
  2. Pat
    Replies:
    5
    Views:
    531
  3. owl
    Replies:
    2
    Views:
    865
  4. Biranchi Narayan Panda
    Replies:
    1
    Views:
    2,718
    Alexey Smirnov
    Feb 17, 2010
  5. Nairb

    screen.height vs. screen.availHeight

    Nairb, Jul 2, 2003, in forum: Javascript
    Replies:
    0
    Views:
    107
    Nairb
    Jul 2, 2003
Loading...

Share This Page