Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on feddit.org
linux_gaming·Linux Gamingbyackthxbye

Lutris: Pre-launch / Post-exit scripts not being executed

I'm on Nobara 42 and use the pre-installed Lutris.

I'm trying to use pre-launch and post-exit scripts with Lutris. My script looks like this: echo "pre launch" > /home/me/Documents/lutris.txt and creates the textfile when I run it manually.
I set the full path to the script in a game as a Pre-launch script and toggled Wait for pre-launch script completion to on.
The game just launches normally when I click play and the text-file is not created.

Can anyone tell me what I'm doing wrong?

View original on feddit.org
10

7 replies

lemmy.ml

So it works now? If so, then glad to be of help.

Just remember that if your shebang points to sh, you can't rely on bash-specific features. The shebang line basically tells the kernel to run your file with the specified program. So, for example, a file with #!/bin/cat will print the full contents of the file (including the shebang) and #!/bin/echo will print the command line. (something like ./script arg1 arg2) As the echo command does not try to interpret arguments as paths, the content of the script would be ignored in that case.

4

Yeah, both the test-script that just echos and the real script I was trying to get to run now work.

I'm guessing when I run it from the terminal I'm already in the context of bash, so the script runs, but when Lutris runs the script I don't have this context?

2
piefed.zip

Do you have space in the path of your script?

Is it executable?

3
ackthxbyereply
feddit.org

There is no space in the path.

And it is executable, if I paste the exact line from the config-dialog into a terminal the script runs as expected and creates the text-file.

1

You reached the end