public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] .bashrc and .bash_profile
@ 2002-03-22 19:02 Christian Loitsch
  2002-03-22 22:31 ` Spider
  2002-03-25 13:09 ` [gentoo-dev] " Christian Loitsch
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Loitsch @ 2002-03-22 19:02 UTC (permalink / raw
  To: gentoo-dev

before opening a bug report, I wanted to be sure, that the following is
correct.

/etc/skel/.bashrc says that it is sourced by all bash shells whether
interactive or not.

But "man bash" says:
When  an  interactive  shell  that is not a login shell is
started, bash reads and executes commands from  ~/.bashrc,
if  that  file exists. 

.bashrc is sourced by .bash_profile
As .bash_profile is sourced for all login shells:

== manpage: ==
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,  [snip]
====

it should probably say:
# This file is sourced by all interactive bash shells on startup,
# whether
# login or not.  This file *should generate no output* or it will break
# the
# scp and rcp commands.


I also would tend to give the alias' into the .bashrc.

This is also to e.g. allow "exec screen" inside the .bash_profile

Please tell me, if I should fill out a bug-report.

christian



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-dev] .bashrc and .bash_profile
  2002-03-22 19:02 [gentoo-dev] .bashrc and .bash_profile Christian Loitsch
@ 2002-03-22 22:31 ` Spider
  2002-03-25 13:09 ` [gentoo-dev] " Christian Loitsch
  1 sibling, 0 replies; 5+ messages in thread
From: Spider @ 2002-03-22 22:31 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

> This is also to e.g. allow "exec screen" inside the .bash_profile
> 

Now -that- would be veeery interesting...

doesn't screen start a login shell everytime it launches?

A wonderful eternal loop of screen->bash->screen->bash->screen->bash ... continuing only until the OOM killer strikes, you run out of file-descriptors, or max-process strikes...

pretty forkbomb, as every screen will stay alive wether the main process is alive or dead, and it will continue until you manage to time the kill to get the last screen (killall....) or change bash_profile ....


*grin*  gotta love this scenario, sounds like something I'd do early one morning ;)


//Spider

--
begin  happy99.exe
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] Re: .bashrc and .bash_profile
  2002-03-22 19:02 [gentoo-dev] .bashrc and .bash_profile Christian Loitsch
  2002-03-22 22:31 ` Spider
@ 2002-03-25 13:09 ` Christian Loitsch
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Loitsch @ 2002-03-25 13:09 UTC (permalink / raw
  To: gentoo-dev

>> This is also to e.g. allow "exec screen" inside the .bash_profile
>>
>
>Now -that- would be veeery interesting...
>
works pretty well.
The only thing I have trouble with, is, that bash_logout is never called
:(
I really want my screen to be cleared everytime I log out.
I the worst case I will patch screen to clear the screen, but this is
not a nice solution.

>doesn't screen start a login shell everytime it launches?
depends:
== man page ==
If the command begins with a '-' character, the shell will
be started as a login-shell.
====
>
>A wonderful eternal loop of screen->bash->screen->bash->screen->bash ...
>continuing only until the OOM killer strikes, you run out of file-descriptors,
>or max-process strikes...
>
>pretty forkbomb, as every screen will stay alive wether the main process
>is alive or dead, and it will continue until you manage to time the kill to
>get the last screen (killall....) or change bash_profile ....
actually its not to hard to stop ;)
Happened to me, when I played with the screenrc to make bash_logout
execute.  I think a few C-c were enough.

cu
christian

ps sorry, for the wrong reply-header


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [gentoo-dev] .bashrc and .bash_profile
@ 2003-12-30 19:22 Tom Hosiawa
  0 siblings, 0 replies; 5+ messages in thread
From: Tom Hosiawa @ 2003-12-30 19:22 UTC (permalink / raw
  To: gentoo-dev

I asked this before on gentoo-user but didn't really get a response, so
I thought I would ask here.

Why isn't .bashrc and .bash_profile from /etc/skel used by default in
/root?

Tom


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [gentoo-dev] .bashrc and .bash_profile
@ 2003-12-30 20:12 Brenden Walker
  0 siblings, 0 replies; 5+ messages in thread
From: Brenden Walker @ 2003-12-30 20:12 UTC (permalink / raw
  To: 'Tom Hosiawa', gentoo-dev

> -----Original Message-----
> From: Tom Hosiawa [mailto:tomek32@rogers.com] 
> Sent: Tuesday, December 30, 2003 2:23 PM
> To: gentoo-dev
> Subject: [gentoo-dev] .bashrc and .bash_profile
> 
> 
> I asked this before on gentoo-user but didn't really get a 
> response, so I thought I would ask here.
> 
> Why isn't .bashrc and .bash_profile from /etc/skel used by 
> default in /root?

/etc/skel is copied into home directories when they are created via adduser
or other scripts.  They are not defaults other than for new user creation.
The root user is never created in the usual user creation fashion, so the
/etc/skel files are never copied.


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-12-30 22:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-22 19:02 [gentoo-dev] .bashrc and .bash_profile Christian Loitsch
2002-03-22 22:31 ` Spider
2002-03-25 13:09 ` [gentoo-dev] " Christian Loitsch
  -- strict thread matches above, loose matches on Subject: below --
2003-12-30 19:22 [gentoo-dev] " Tom Hosiawa
2003-12-30 20:12 Brenden Walker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox