How to detach lutris post script from lutris-wrapper

Hello
I have a pre-launch script which kills some of my background processes like my compositor (picom) and redshift.
On the post-launch script, I rerun these commands and everything works fine. The problem is that these programs, no matter what I do, are always a subprocess of lutris wrapper.

The problem is that lutris-wrapper eventually dies (when I close lutris, run another game, etc), taking my background processes with him.
I’ve tried

nohup picom &
setsid -f picom &
(picom &) &
...

image

To no avail, the program is still child of lutris-wrapper.

I’ve also tried to add the processes to the “Exclude Processes” box, doesnt work.
How can I resolve this problem?

Maybe adding the bg command to make it a background process? The jobs command can be used to monitor.

Check the command “disown”, i believe that is what you are looking for.

I had already tried disown.

Tried again with the scripts below, with and without nohup, didn’t work.

#!/bin/bash

pidof "redshift" || nohup redshift-sakura & disown
pidof "xautolock" || nohup xautolock-sakura & disown
pidof "picom" || nohup picom & disown
#!/bin/bash

pidof "redshift" || redshift-sakura &
pidof "xautolock" || xautolock-sakura &
pidof "picom" || picom &
disown -a

The script works when I execute it from the terminal, lutris is hugging those processes with all of his might

bg also didn’t work, I’m also not sure what’s happening, something to do with executing a process through python perhaps?

what happens if you disable the Lutris Runtime?

nothing, by the hover tip of lutris runtime, I don’t think it has something to do with lutris-wrapper. Not sure tho. Just to be sure, It also doesn’t work on your computer right?

shall I open an issue on github?