And this is complicated… I asked on #tmux (IRC, Freenode) and here is the answer:
2015-09-29 09:10:22 Nei I think tmux simply doesn't support it
2015-09-29 09:11:06 Nei there is an obscure undocumented sequence you can use to pass things "through tmux" to whatever it is running on
2015-09-29 09:13:24 Nei something like \ePtmux;\e\e]52;; ... \e\e\\\e\\
2015-09-29 09:13:32 Nei note the doubling of \e
2015-09-29 09:13:48 Nei http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324
2015-09-29 09:18:45 Hywan Wow
2015-09-29 09:19:12 Hywan And how can I detect whether I am running inside tmux?
2015-09-29 09:19:20 Hywan Or should we implement this feature in tmux?
2015-09-29 09:19:30 Hywan (the clipboard escape sequence)
2015-09-29 09:19:53 dmnc Check $TMUX
2015-09-29 09:20:03 dmnc That is how tmux decides if it's running inside tmux or not afaik.
And this is complicated… I asked on #tmux (IRC, Freenode) and here is the answer:
Now we have to try :-).