1

I'm trying to create a symbolic link on a PATH location that points to a program (OpenTTD), located in a folder that contains the game files. My main issue is that, when I create the symbolic link, using:

ln -s ~/full/path/to/openttd ~/bin/openttd

I ran into the following console error:

Error: No available language packs (invalid versions?)

This means that the game "link" can't find the necesary files needed to run properly, because it gets "executed" directly from the directory where the link is located (in this case "~/bin") and it searchs only there for the required files, instead of looking into ~/full/path/to/ ; The same thing happends if I "move" the executable openttd to ~/bin/ and run it through terminal (this was done for testing purposes to know if it was the lack of game files that was causing the error).
Please note that if I run the game either via a ~/full/path/to/openttd command or double clicking the file, the game runs just fine.

My question here is if there's a way to either create a symbolic link the same way that we could create a shortcut in windows, I don't really know if that's even possible.

Thanks, I couldn't find a similar question. The closest one was this: https://superuser.com/questions/511900/why-doesnt-my-symbolic-link-work And it's what I already tried.

5
  • 1
    Why wouldn't you create a link in $PATH to a script, cd -ing into the appropriate directory and subsequently run your app? Feb 19, 2017 at 15:16
  • Well, of course I could do that and that's it, but the problem is that if I start collecting games I would have to create a new PATH reference for each one, instead of this other way, that I don't know if it works at all. :) Feb 19, 2017 at 15:21
  • Ah, I got what you said, create a sh script with "cd ~/full/path/to/openttd;openttd", Hmm, yeah, that would work!. Thanks. Feb 19, 2017 at 15:23
  • Please try, if it works for you like that, I'll make it an answer :) (or you could, but we should answer it anyhow then). Feb 19, 2017 at 15:31
  • Ready @JacobVlijm ! Feb 19, 2017 at 23:12

1 Answer 1

1

Ok, thanks to @"Jacob Vlijm" I solved the problem. Just create a script in the folder where your "$PATH" points to, and add a single line command that states:

~/full/path/to/openttd

And name it as whatever you want, then, simply run the script by writing the name of it in the console.

You must log in to answer this question.

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