Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have this problem creating a launcher. I downloaded a tar.gz and extracted it: CaveStoryPlus from the Humble Bundle 4. If I double click the executable in Nautilus, it launches. If I run ~/CaveStoryPlus/CaveStory+ in the terminal it doesn't launch but if I run cd CaveStoryPlus && ./CaveStory+ it launches. Then if I try to create an application launcher in Main Menu (alacarte), nothing works for me even if I state "Application in terminal" with the above command.

(Edited post to show I ran the command with the full path)

share|improve this question

1 Answer 1

You need to be in the working directory for you to be able to issue ./CaveStory+, UNLESS the directory is added to the $PATH environment variable. Once that is done, you will be able to just call ./CaveStory+ from any directory.

To just edit the $PATH variable in one terminal instance and set it as a Global Variable, you can do export PATH=$PATH:/absolute-path-to-cavestory-directory/

If you want it to be a permanent change, add the same export PATH=$PATH:/absolute-path-to-cavestory-directory/ to your ~/.bashrc file (preferably at the end of the file, just to keep track of what you added personally)

Take a look at the Ubuntu Community Documentation on environment variables or this blogpost for more information about environment variables.

share|improve this answer
    
Sorry, I omitted to mention that I tried running the command with the full path. The strange thing is that I already tried adding the path to my .bashrc, sourced it and when I try to execute the command the shell can't find it. –  daithib8 Dec 27 '11 at 13:16
    
no joy. i even tried with quotes around it. –  daithib8 Dec 27 '11 at 13:59
    
Instead of ~/CaveStoryPlus/ try /home/username/CaveStoryPlus/ –  nitstorm Dec 27 '11 at 17:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.