In order to open a new screen window in the same directory as the current working directory of the screen window you are launching it from (rather than the directory you initially launched the screen session from), this works:
...unless the current screen session has had its name set with
C-a, :sessionname. In that case where for example the session is named:
$ screen -ls There are screens on: 18282.FOO_BAR (11/02/16 16:25:52) (Attached)
instead of opening a new screen window the solution in the answer linked to above gives for example:
$ screen -X chdir $PWD;screen /var/run/screen/S-username/18282.pts-29.hostname: No such file or directory /var/run/screen/S-username/18282.pts-29.hostname: No such file or directory
Is a workaround possible to make this work for named screen sessions?