Index · Preferences · Help
General Discussion · Distributions · Projects and Challenges · Programming Help · System Help · Wine · Virtual Machines · Applications · Screenshots
Forum Search:

[Advanced Search]

[Messages in this Thread] [Show All (2)] [Return to General Discussion]

Author:Stupot (Guild Staff) [Posts]
Date:10/27/09 7:38 am
Topic:Re: Changing the default PATH
Post ID:553
Parent ID:552
I'm not quite sure why you want to add . to your PATH. You can run applications in the directory you are in by using the command ./my_app That ensures that you run the app from the current directory as opposed to any other directory in the path and it will execute it regardless.

To add a directory to the path of a single user, place the lines in that user's .bash_profile file. Typically, .bash_profile already contains changes to the $PATH variable and also contains an export statement, so you can simply add the desired directory to the end or beginning of the existing statement that changes the $PATH variable. However, if .bash_profile doesn't contain the path changing code, simply add the following two lines to the end of the .bash_profile file:

PATH=$PATH:/data/myscripts
export PATH

Lastly, to run a program in a terminal and receive a prompt back, simply use the &.
Example:
my_app &

The output from my_app would still show up in the terminal, but you would be able to run other apps regardless. If you wanted to redirect the output or input, you still can, just add an & at the end.
my_app > file.txt 2> err.txt &

Messages in this Thread: [Show All (2)]

  Changing the default PATH Theodis (10/25/09 12:19 pm)
      Re: Changing the default PATH Stupot (10/27/09 7:38 am)