Original question:
After I install a program on our Unix computer I must add the
program touser's PATH that in user's initialization (.profile, .login, and
.cshrc)files.
So that users can type and run the program directly from user's
homedirectory.What method should I use to add path to all users by one step?
Thank you!
Anwsers:
create a link in /usr/bin to the executable of
the program. All users should have a path to /usr/bin.
The other way around it is to add the path to /etc/profile and
/etc/csh.login
as the login shells look at those files first before going to local
.profile and .cshrc files. That should take care of all logins.
For example, you can add
PATH=/bin:/usr/bin:/usr/bin/X11
export PATH
to the /etc/profile file. This will give all users who log in this
path.
Or
Add the directory to the PATH in /etc/profile (for ksh, sh,
etc) and in /etc/csh.login (for csh, tcsh, etc.). In /etc/profile:
PATH=$PATH:/new/directory
export PATH
In /etc/csh.login:
set path=($path /new/directory)
Or
create a wrapper script
which sets the variables, and stick it in /usr/local/bin.
e.g. /usr/local/bin/btoolkit :
#!/bin/sh
# Run btoolkit program, after setting environment variables.
PATH="/usr/btoolkit/bin:${PATH}" ; export PATH
BKIT=/usr/local/btoolkit.4.58beta/BKIT; export BKIT
exec $BKIT/BToolkit "$_at_"
Professionally written applications do this as default.
***************************************
Thanks to:
noghri [noghri_at_nauticom.net]
Allan.Simeone_at_aventis.com
alan_at_nabeth.cxo.dec.com
Oisin McGuinness [oisin_at_sbcm.com]
Nigel Gall [nigelg_at_ppsl.com]
Jim Jennis [jjennis_at_discovery.fuentez.com]
Freesmeyer, Mary [Mary.Freesmeyer_at_LendersService.com]
Scott Mutchler [smutchler_at_gfs.com]
Jay Leafey [jay.leafey_at_mindless.com]
Larry Griffith [larry_at_cs.wsc.ma.edu]
Udo de Boer [udo.de.boer_at_live.demon.nl]
Ian 'Ivo' Veach [ivo_at_scs.unr.edu]
Mohamed Nayle [nayle_at_ncsbah.com]
FALCHERO Paolo [paolo.falchero_at_its.it]
Nikola Milutinovic [Nikola.Milutinovic_at_ev.co.yu]
Peter Stern [peter_at_chemphys.weizmann.ac.il]
Gernot Salzer [salzer_at_logic.at]
Bob Vickers [bobv_at_dcs.rhbnc.ac.uk]
++++++++++++++++++++++++++++++++++++++++++
Hongya Zu
Research Information Service
Children's Research Institute
700 Children's Drive
Columbus, OH 43205
Phone: (614) 722-2914
Fax: (614) 722-2716
Email: zuh_at_pediatrics.ohio-state.edu
+++++++++++++++++++++++++++++++++++++++++
Received on Wed Feb 02 2000 - 18:53:59 NZDT