Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to launch the 32-bit binary reclient_linux_32 that comes with the Linux Red Eclipse game. I've successfully built from source and also have another version of the executable. If I open a window and manually click on either executable, then the game launches without problem. If I open a terminal, navigate to the folder where either binary is located, and execute it from command line, then both also launch with no problem.

But if I make an app launcher, or even just open a terminal and execute the command to launch the binary from some different directory, I get an error saying that the game cannot load textures. I'm assuming these texture files are located locally near the binary files. But still, many executables require nearby files yet can still be launched from anywhere. Why is this an issue?

Please note: both executables have correct permissions.

share|improve this question
up vote 1 down vote accepted

The "game" probably has hard-coded paths to directories relative to the working directory. i.e. "../textures/blah" instead of "/usr/local/game/textures/blah" ... without the src... couldn't begin to test.

share|improve this answer
    
You're probably correct, but it is a well-maintained game: link. If they did hard-code file paths, is there no work around that launches the binary as though it was being launched from within that folder? Could I make a script that simulates navigating there, then executing it? – Mr. F Dec 20 '11 at 19:52

The reason might be that the program is searching the textures files only in the current directory (the message says so). To get closer to the reason, your could run the program with strace -v /path/to/program, it should show you what files it wants to open.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .