Skip to main content

Thread: Set permanent environment variable for a user


hi,

trying set environment variable user not sure how to.
read here
environment variable settings should affect particular user (rather system whole) should set into:

~/.pam_environment - file meant setting user's environment. not script file, rather consists of assignment expressions, 1 per line.
note: using .pam_environment requires re-login in order initialize variables. restarting terminal not sufficient able use variables.

if using kde, see kde user-base page on topic.

not recommended:

~/.profile - best file placing environment variable assignments, since gets executed automatically displaymanager during start-up process desktop session login shell when 1 logs-in textual console.
~/.bash_profile or ~./bash_login - if 1 of these file exist, bash executes rather "~/.profile" when started login shell. (bash prefer "~/.bash_profile" "~/.bash_login"). however, these files won't influence graphical session default.
~/.bashrc - because of way ubuntu sets various script files default, may easiest place set variables in. default configuration guarantees file executed in each , every invocation of bash while logging in graphical environment. however, performance-wise may not best thing since cause values unnecessarily set many times.
does mean have add following line either of files?
code:
export abc=/home/user/abc

what variable wanting set?


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] Set permanent environment variable for a user


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account