.bash_profile not being read
Bob McClure Jr
robertmcclure at earthlink.net
Mon Sep 12 02:47:53 UTC 2005
On Mon, Sep 12, 2005 at 05:18:38AM -0400, jim ruxton wrote:
> Hi ,
> I'm trying to get a program to start after booting up. I put the command
> in .bash_profile since I want it to started by a user ( which is why I
> didn't put it in rc.local). Anyway it doesn't appear to be starting. It
> looks as if the .bash_profile script is not being read. Any ideas why?
> Thanks,
> JIm
The .bash_profile is not read until the user logs into the GUI or
starts a login shell. If you want to run it at boot time as some mere
mortal user, put it in rc.local this way:
su - someuser -c /path/to/command/to/run &
and remember that the su process will give you little or no
environment, so use explicit paths on everything, or if the command to
run is a script, set the path at the top of the script:
PATH=/bin:/usr/bin:/usr/local/bin:$HOME/bin
(Tune as needed.)
Cheers,
--
Bob McClure, Jr. Bobcat Open Systems, Inc.
robertmcclure at earthlink.net http://www.bobcatos.com
Peace at any price is inflationary.
More information about the Redhat-install-list
mailing list