Man, I was running into the same problem, but looked around some more, and found that:
screen -dmS test my_interactive_program screen -S test -p 0 -X hardcopy /tmp/my_dump will work just fine. The clue here is -p 0, which means "send this command to window 0" This is what you were missing. When you attach with screen -x, you force screen to select a default window (probably number 0), and so your subsequent hardcopy commands start working. Reference: http://www.jerri.de/blog/archives/2006/05/02/scripting_screen_for_fun_and_profit/ ("Getting the contents of a window") Cheers! Arturo Hi Everyone! I just wanted to let you know that I found a workaround for this problem, and make sure it is documented here for future references of others who might have the same problem. I found several references to this problem on the internet (Some dating back as far as 2004) but no solutions or workarounds. snip -- View this message in context: http://www.nabble.com/Weird-problem-using-%27hardcopy%27--%3E-Blank-screen-when-never-opened-in-real-terminal-tf3900816.html#a12531631 Sent from the Gnu - Screen mailing list archive at Nabble.com. _______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
