my first thought was environment variables:
Code:
$ env|grep XDG
XDG_VTNR=1
XDG_SESSION_ID=c2
XDG_SEAT=seat0
XDG_RUNTIME_DIR=/run/user/1000
these could be modified freely for your application, e.g.
Code:
XDG_SESSION_ID=d1 thunderbird
maybe you could create your customized xdg session?