Re: process /etc/profile Redhat



On 2007-05-22, zurk1982@xxxxxxxxx <zurk1982@xxxxxxxxx> wrote:

I edited the etc/profile to add some environmental variables for
informix nd changes to the PATH variable. Now I want to process the
file so the changes take effect. I know that the file is read on
reboot but I don't want to have to reboot every time I make a change
to /etc/profile. How do I do that? I am sure that there is a way.

First off, to add to what everyone has already posted, /etc/profile *IS
NOT* read on boot! /etc/profile is read by bash (and perhaps other
shells) on *login*.

You've gotten two suggestions: using the source command, and logging out
and back in. The latter is the most sure way, since if you're using X
it's the only way to effect a change in the X environment.[0] Using
source /etc/profile will only make changes in the shell where you type
source /etc/profile (and subshells), so if you have open terminal
windows, and type it in one window, the other existing windows will not
get the change. As long as you are aware of this, you can use whichever
options makes more sense at the time.

The real problem is that you still haven't really described what you are
doing with your new PATH. Is it you sitting at an X window wanting to
propagate your new PATH? Is it some sort of dummy database user which
is being used to start daemons? Is it some cron job? The more you
describe, the more accurate help you will get.

--keith

[0] I supposed restarting the window manager might also do it, but I
haven't tested that.

--
kkeller-usenet@xxxxxxxxxxxxxxxxxxxxxxxxxx
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

.



Relevant Pages

  • Re: Why, why why... everytime I move to a new pc tclapp fails to work??
    ... environmental variables are defined. ... While keeping the dos window opened, I double-clicked on the file print_env.tcl, from the explorer window. ... From naively reading what others have written in this thread, perhaps the Tcl DLL is being cached in memory the first time you run it and all subsequent Tcl programs see the environment it had when it was first loaded? ...
    (comp.lang.tcl)
  • Re: Why, why why... everytime I move to a new pc tclapp fails to work??
    ... environmental variables are defined. ... While keeping the dos window opened, I double-clicked on the file print_env.tcl, from the explorer window. ... From naively reading what others have written in this thread, perhaps the Tcl DLL is being cached in memory the first time you run it and all subsequent Tcl programs see the environment it had when it was first loaded? ...
    (comp.lang.tcl)
  • Re: How can I derive the username (programmatically) after a user log.
    ... "Todd Shillam" wrote in message ... just open MS-DOS: ... When the window opens, just type 'set' and press the key--a list ... will appear that displays all your environmental variables. ...
    (microsoft.public.access.security)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: One more then bed
    ... ripping off the heads and shells and then throwing them out of the window. ... The woman then started some knitting and all the man could hear while he ...
    (uk.people.silversurfers)