I have about 15 instances of screen running on my linux server. They are each running processes I need to monitor. I had to close terminal (hence the reason I launched screen).

Is there a way to reopen all 15 instances of Screen in different tabs without having to open a new tab, login to the server, print all the available screens to resume, and then type in the id for each screen session?

  • What terminal are you using? Gnome Terminal, KDE, other?
    – cjm
    Jul 12, 2011 at 9:19
  • ANSWER (@cjm): I'm using terminal on mac osx. Jul 12, 2011 at 9:21

1 Answer 1


This python script just did the job for me. I made three screen sessions and this fires up three xterms with the sessions reattached in each. It's a bit ugly but it works.

#! /usr/bin/env python                                                                                                                         

import os

if __name__ == '__main__':

    tempfile = '//tmp//screenList'

    # capture allthescreenIds                                                                                                                
    os.system('screen -ls | grep Det | cut -d . -f 1 > ' + tempfile)

    f = open(tempfile, 'r')
    screenIds = f.readlines()

    screenIds = [x.lstrip() for x in screenIds]

    for eachId in screenIds:
        cmdLine = 'xterm -e screen -r ' + eachId.strip() + ' &'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .