[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian equivalent of /etc/profile.d



On Tue, Aug 17 at 09:32AM -0300, Leandro Guimaraens Faria
Corsetti Dutra wrote:
> Em Tue, 17 Aug 2004 05:20:06 +0200, Jeremy Brown escreveu:
> > does all initialization I want to do need to go directly
> > into the file "/etc/profile"?

sorta.

according to "man bash" there's /etc/profile (login) and
/etc/bash.bashrc (interactive). not to mention user-specific
files ~/.profile and ~/.bashrc. from the INVOCATION section:

	When  bash  is  invoked as an interactive login shell, or
	as a non-interactive shell with the --login option, it
	first reads and executes commands from the file
	/etc/profile, if that file exists.   After reading  that
	file,  it looks for ~/.bash_profile, ~/.bash_login, and
	~/.profile, in that order, and reads and executes
	commands from the first one that exists and is readable.
	The  --noprofile  option may be used when the shell is
	started to inhibit this behavior.

	When an interactive shell that is not a login shell is
	started, bash reads and executes commands from ~/.bashrc,
	if that file exists.  This may be inhibited by using the
	--norc option.  The --rcfile file option will force bash
	to read and execute commands from file instead of
	~/.bashrc.

on a full moon in a no parking zone after a meteor shower during
even-numbered months unless your inlaws live within 50 miles...

what i think that means is

	LOGIN shells source /etc/profile then ~/.profile

	INTERACTIVE shells source ~/.bashrc (and the debian
	incarnation, i understand, sources /etc/bash.bashrc)

so if you want all your interactivity consistent, put it into
/etc/bash.bashrc -- for once-per-login stuff (things that
subprocesses will inherit, like environment stuff) plop it in
/etc/profile.

right?

-- 
I use Debian/GNU Linux version 3.0;
Linux boss 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i586 unknown
 
DEBIAN NEWBIE TIP #110 from Dimitri Maziuk <dmaziuk@yola.bmrb.wisc.edu>
:
Here's how to TUNNEL SECURE X11 CONNECTIONS THROUGH SSH: on the
client, do this:
	local-client# export DISPLAY=:0.0
	local-client# ssh -X server
then once you're logged in at the server, do:
	remote-server# netscape &
The environment created at the server will include the DISPLAY
variable, so netscape (or whatever) will dialogue with the
client machine. (See "man ssh" for more.)

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: