Saturday, February 24, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 7556  / 1 Year ago, sun, march 19, 2023, 3:05:07

I am using Lubuntu 12.04.



I am having problems setting the path variable for my application.



I am trying to set the path variable in the .profile file, however after adding the path when I echo $PATH, it does not show my addition.



Here is the line I am adding at the end of the .profile after the 'fi'



export PATH=$PATH:/home/treedev/lib/Qt/bin


Please let me know what I am doing wrong. When I run the above command directly in the bash shell, it works, which leads me to believe I am doing something wrong, but I can't seem to figure out where I am wrong.



Thanks for your time.


More From » lubuntu

 Answers
6

To add a system-wide path, simply add to the PATH variable defined in /etc/environment.




  1. Press Alt+F2 and type gksudo gedit /etc/environment

  2. Change the default path:



    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"


    by adding your path to it:



    PATH:"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/treedev/lib/Qt/bin"



To add this path only to your session (i.e. for your user only), add to ~/.pam_environment instead:



PATH=$PATH:/home/treedev/lib/Qt/bin



Related: Please see the Ubuntu Wiki on Environment Variables.



[#36852] Tuesday, March 21, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rialhirt

Total Points: 422
Total Questions: 113
Total Answers: 120

Location: France
Member since Sun, May 15, 2022
2 Years ago
;