screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird problem using 'hardcopy' -> Blank screen when never opened in


From: Gekke Prutser
Subject: Re: Weird problem using 'hardcopy' -> Blank screen when never opened in real terminal
Date: Wed, 13 Jun 2007 12:32:08 +0100

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.
 
The problem was that screen -X hardcopy (or in fact some other -X commands such as 'stuff') didn't work until I attached to the newly created screen with 'screen -x'. Apparently it skips some important initialization bits if no terminal is attached.
 
My workaround is to start 'screen -x' in a new screen session of its own, and then quitting that. That initializes the original screen that I want to monitor.
 
Here's an example start script for one of our gameservers:
 
#!/bin/sh
screen -S gameserver -d -m <command to start gameserver>

# Initialize screen session
screen -S init-gameserver -d -m screen -x gameserver
sleep 2
screen -x init-gameserver -X quit
 
It's probably not the prettiest solution but it's the best I could come up with for now :) And it works.
 
Regards,

Tycho Schenkeveld (GekkePrutser)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]