El Tito
October 28th, 2012, 04:34 PM
Hi everybody. I'm new to the forums. I have been using ubuntu for a couple of years, but never posted before. I'm interested in understanding how the stuff works.
I searched in the forums about setting the PATH and making the change permanent, but all I found are a bunch of instructions to get the things done, with little explanation.
Correct me if I state something that is not right. When you add something to the PATH, via command line you need to export; for example:
PATH=/whatever:$PATH
export PATH
When you do that, the changes take place in the current session, and after you close it, the changes are gone. Maybe the question is too simple, but why do you need to export?, I mean, with the first command above, you succesfully add '/whatever' to PATH, and is possible to run executable files inside '/whatever'.
The second question is, I read a lot of posts in which some people add PATH to the end of the file '.bashrc', others to '.profile'. I'm running kubuntu 12.10, what's the difference?, the first is only for CLI and the second is valid for GUI?. Writing inside these files, do I need to add the mentioned PATH and export, or only PATH is enough?
The last question is about the edit applications option in the KDE menu. I have created a launcher, and if I specify the absolute path to that executable in 'command'(general tab), I get the program running without problems. If i set the working directory in the advanced tab, to '/whatever', I was expecting that only calling the name of the program in 'command' would be enough, to execute it but not working. Also, if I have added to PATH that working directory, why can't I simply call the program by name in 'command'?
Thank you very much in advance, and sorry about my english (non native speaker).
See you around!!
I searched in the forums about setting the PATH and making the change permanent, but all I found are a bunch of instructions to get the things done, with little explanation.
Correct me if I state something that is not right. When you add something to the PATH, via command line you need to export; for example:
PATH=/whatever:$PATH
export PATH
When you do that, the changes take place in the current session, and after you close it, the changes are gone. Maybe the question is too simple, but why do you need to export?, I mean, with the first command above, you succesfully add '/whatever' to PATH, and is possible to run executable files inside '/whatever'.
The second question is, I read a lot of posts in which some people add PATH to the end of the file '.bashrc', others to '.profile'. I'm running kubuntu 12.10, what's the difference?, the first is only for CLI and the second is valid for GUI?. Writing inside these files, do I need to add the mentioned PATH and export, or only PATH is enough?
The last question is about the edit applications option in the KDE menu. I have created a launcher, and if I specify the absolute path to that executable in 'command'(general tab), I get the program running without problems. If i set the working directory in the advanced tab, to '/whatever', I was expecting that only calling the name of the program in 'command' would be enough, to execute it but not working. Also, if I have added to PATH that working directory, why can't I simply call the program by name in 'command'?
Thank you very much in advance, and sorry about my english (non native speaker).
See you around!!