Page 1 of 1

Cannot Open FTL on Linux Fluxbox 1.3.2

Posted: Tue Oct 16, 2012 12:37 pm
by Little_Boy
Hello Everybody. I want to launch my game , FTL on my Laptop. He use Fluxbox 1.3.2.
So I use this command , "sh FTL" on my FTL directory but he say me after this command on the shell : "FTL: line 8: ./FTL: Permission denied" I try to change the right with the chmod but nothing change. The Readme say me to place the game on the root folder but I don't have access on my root folder. So it's imperative to move the game on the root or we can launch the game with a another solution ? Thanks for your answer.

Re: Cannot Open FTL on Linux Fluxbox 1.3.2

Posted: Tue Oct 16, 2012 2:19 pm
by boa13
You certainly do not need to place the game in the root folder, maybe you misunderstood the readme, or maybe it is incorrect.

You can pretty much unpack the game anywhere you want. Ensure all the files belong to "you" (the user running the game), and that the FTL script in the top folder has execution rights at least for you ("chmod u+x" or something similar).

Your command-line is a bit strange. You sound like you are trying to execute the FTL directory? This will not work obviously. From command-line, the best is most likely the following:

Code: Select all

cd /where/you/put/FTL
./FTL
First line is to make sure you are in the top directory of the game (of course, you have to adapt it to where you uncompressed the game). Second line should be enough to start the game if the script has properly been made executable with chmod (don't forget the dot slash at the start).

If you still get the error, then there is a possibility that the archive was incorrectly uncompressed, and that the permissions on the various subdirectories were lost. Either try to decompress the game again, or try to fix the directory permissions so that they have "rwx" at least for the user.

Re: Cannot Open FTL on Linux Fluxbox 1.3.2

Posted: Tue Oct 16, 2012 8:01 pm
by gertvv
I prefer not to have the game data in my home folder for several reasons: it is encrypted and hence slower, other accounts do not have read permission on my home so I can't let someone try the game under the guest account without messing up my saved game, and ubuntu puts my other games under /opt. Plus having root own the files makes it more difficult to inadvertedly delete or modify anything.

Two very simple changes to the packaged binaries make it installable in /opt and ensure that the files can be owned by root:

1. Change the FTL/FTL script to detect the directory it resides in (from http://stackoverflow.com/questions/5989 ... -stored-in)

Code: Select all

#!/bin/bash

DIR=$( cd "$( dirname "$0" )" && pwd )

# enter the game directory
cd $DIR/data


# run FTL
./FTL "$@"
2. Put "world" read access on FTL/data/resources/*.dat (these were the only files that didn't have such permissions):

After that I put the files in /opt and did a 'chown -R root.root /opt/FTL' with no problems running the game afterwards (by just invoking /opt/FTL/FTL). In my opinion it is strange to have to cd into the game directory first.

Re: Cannot Open FTL on Linux Fluxbox 1.3.2

Posted: Wed Oct 17, 2012 1:43 am
by Zorael

Code: Select all

DIR=$( cd "$( dirname "$0" )" && pwd )
That.... is a pretty horrible way to get the right directory. :3 Bad stackoverflow!

Code: Select all

#!/bin/bash

DIR="${0%/*}"

cd "$DIR/data"
./FTL "$@"
But yes, this sounds like the real data/FTL binary isn't set as executable, for one reason or another.

You say you tried to "set it right with chmod"; could you give specifics on what you did?


edit: If any developer or similar is reading this thread, just let me humbly point out that you probably/really/definitely want to consider a different approach than cd ./data. It seems to be convention between the desktop environment camps to set the working path to the xdg documents directory when executing something.

DIR="$(dirname)" works. DIR="${0%/*}" for inprocess mangling is sexier. And as always, quotes are important.

Re: Cannot Open FTL on Linux Fluxbox 1.3.2

Posted: Thu Oct 25, 2012 9:30 am
by Little_Boy
Manny Thanks for your reply , I will test this after my work :-)