Reply
Thread Tools
Posts: 47 | Thanked: 11 times | Joined on Oct 2006
#11
Originally Posted by qwerty12 View Post
echo "PATH=/sbin:$PATH" >> ~/.profile

^ should work.

As for your second question, look at the file /etc/profile.d/prompt.sh and google bash PS1.

Corrected thanks to free here:
http://www.internettablettalk.com/fo...73&postcount=4
For those searching for "N900 $PATH", I add: After much reading and some courage I added "/home/user/bin" using the above. (((There was no /home/user/.profile so I created it with text: "PATH = $PATH:/user/home/bin"))). It works. I can now safely run some little shell scripts (stored in /home/user/bin which I created for this purpose) as user. Thanks querty12.
 

The Following User Says Thank You to statwrangler For This Useful Post:
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#12
Just because I'm on of those attention to detail idiots...

You'll notice in qwerty's he put the added path before the $PATH:
Code:
/sbin:$PATH
And you put yours after the $PATH:
Code:
$PATH:/user/home/bin
99.99% of the time this will never matter. However, that IS order sensitive... if you have two applications on the system with the same name in two different paths, the first one it comes to in your $PATH variable will be the one executed. So, just for example, you write a wrapper for VI or something that enables colors or uses VIM or other command line options and store it as "vi".. put it in ~/bin and then put that after $PATH.. it'll never run.

Like I said... 99.99% of the time it'll never matter.. but there can be uses for understanding this.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 47 | Thanked: 11 times | Joined on Oct 2006
#13
You are right that the order matters. My choice of after was deliberate. I can always change the name of my script (e.g. myvi). I will know immediately if I have picked a name used by the shell. But if I put my bin first, I might pick a common name and much later find that the standard procedure was not available -- and having forgotten my script, be puzzled. De gustibus ....
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 00:40.