Results 1 to 4 of 4

Thread: Screen: stay alive

  1. #1
    Join Date
    Sep 2007
    Beans
    242

    Screen: stay alive

    Sometimes when I need to run a command that takes hours, I use screen, run the command inside that screen session, then I detach from the session. Normally, the screen session stays alive only for a few minutes past the completion of the last command. Is there a way to make it stay alive indefinitely, so that I can go back and kill it by hand?

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,760
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Screen: stay alive

    Hi hojjat.

    I use 'screen' all the time.

    How are you launching your command?
    Are you launching as an argument in an screen command?

    Regards.

  3. #3
    Join Date
    Sep 2007
    Beans
    242

    Re: Screen: stay alive

    Sorry for the very late respond. I run screen, then in the command line I run a command, and then I press CTRL+A then D to detach.

  4. #4
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,760
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Screen: stay alive

    That is very strange. The screen should stay alive running an interactive bash shell after the command ends.

    By any chance are you running a bash script using the source command or the '.' option?
    Does the screen not appear at all if you do an screen listing ( screen -ls )?

    Regards.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •