How do you nohup flatpak?

hi i use kodi for my media and i log in from a remote cpu to control it when it is apt i could run the cmd “export DISPLAY=:0\n”+“nohup “+“flatpak run tv.kodi.Kodi”+”\n” and disconnect and it would work but i just updated to latest version and when i run “export DISPLAY=:0\n”+“nohup “+“flatpak run tv.kodi.Kodi”+” nohup\n” it opens but when i log out of session (close the terminal) it closes kodi on the remote cpu running kodi so how do you dissconnect and keep the flatpak app running oops i forgot to mention its ubuntu kind regards thanks for any help

not sure if user/system install would make any difference here?