Was still parsing the session variable DESKTOP_CODE rather than the desktop-code$DISPLAY session file.