This post from 2 1/2 years ago has the solution which is near enough to exactly the one that I came up with, as it used code from the script that it calls (which gets it right).
http://www.ftlgame.com/forum/viewtopic. ... 8585#p7523
The script is, to put it politely, rather rudimentary. There are exactly 2 lines of code with zero error checking.
Code: Select all
# enter the game directory
cd ./data
# run FTL
./FTL "$@"
KDE throws out a very good error message when I try to open a file manger window:
Code: Select all
KDEInit could not launch '/bin/dolphin': Unable to create new process. The system may have reached the maximum number of processes possible or the maximum number of processes that you are allowed to use has been reached.
Wrapping an if statement around it all would be good too, just in case us users do anything else stupid...
Code: Select all
#!/bin/bash
here="$(dirname "$(readlink -f "$(which "$0")")")"
# enter the game directory
if [ -d "$here/data" ]; then
cd "$here/data"
else
echo "data directory not found"
exit 1
fi
# run FTL
./FTL "$@"
Cheers
PS: The MUST READ post told me to report bugs at http://www.GetSatisfaction.com/FTLgame , but its broke.