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)
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to