changing /etc/environment did not affect my environment variables

I don't know the reason why PATH wasn't changed (after relogin), but

EYE_HOME = "/home/mohammad/Desktop/eye"
--------^-^

those spaces prevent EYE_HOME to be set.

It should be noted that /etc/environment is not a script file, but a kind of assignment file that is read by PAM. OTOH such spaces are not allowed in script files like /etc/profile and ~/.profile either.

If you use a script file, you need to export the variables as shown in Avinash Raj's answer.

Please note that while ~/.bashrc works if you start your program from a terminal window, it may not work if you start it from the graphical environment, since it's not sourced by the display manager.


gedit ~/.bashrc

After that add the below lines,

export EYE_HOME="/home/mohammad/Desktop/eye"
export PATH=$PATH:$EYE_HOME

Save the file and sourec it,

source ~/.bashrc