I was having trouble launching ovito from a desktop file. To send commands through to a new tmux session and then close it out I ended up with.

1[Desktop Entry]
2Name=OVITO
3Type=Application
4Exec=/usr/bin/tmux new-session -d -s ovito "bash --init-file <(echo '$HOME/.local/bin/ovito && tmux kill-session -t ovito')"
5Icon=ovito
6Terminal=false
7StartupNotify=false
8Categories=Education;Science;Mathematics;
9Comment=Open Visualization Tool

So basically create a named session, run a bash instance, then kill the session at the end of it. Without the bash session, tmux exits immediately after executing ovito.

One caveat is that it only works for a single instance at a time.