I typically have a single screen session to which I connect using screen -x. Whenever I want to edit a file with vim, I'd like to:
1. Open a new xterm.
2. Connect to the screen session.
3. Create a new screen window and start vim in it.
Ideally I'd like the following command to work (from within a screen session):
xterm -e screen vim foo.cc
However, it partially works, the new xterm is created and has the STY variable. Thus screen opens a new window in that same session and starts vim. However, the new xterm window doesn't connect to that session. Any thoughts on why this happens? I'm using screen version 4.02.