public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] /etc/profile
@ 2001-01-14 15:48 Morgan Christiansson
  0 siblings, 0 replies; 9+ messages in thread
From: Morgan Christiansson @ 2001-01-14 15:48 UTC (permalink / raw
  To: gentoo mailing list

$PS1 var:

I think this should be the opposite, if the user isn't root let the user
know who they are.

And if they are root, give them the "supershell" without the user-name.


if [ `/usr/bin/whoami` == 'root' ] ; then
         export PS1='\[\033[01;32;40m\]\u@\h \[\033[01;34;40m\]\W 
 >\[\033[00m\]'
         export PATH=/sbin:/usr/sbin:$PATH
else
         export PS1='\[\033[01;34;40m\]\W > \[\033[00m\]'
         export PATH=$PATH
fi

----------------------------------------------------------------------

ls alias:

I think "alias ls='ls --color=auto'" should be in /etc/profile.

Most other distros have it and besides, it's a lot more readable.

I saw there were other aliases such as "alias d='ls --color'" but i've
never used them.

-- 
Morgan Christiansson



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

* [gentoo-dev] /etc/profile
@ 2001-12-03  1:52 Zach Forrest
  2001-12-03  2:16 ` jano
  2001-12-03 23:55 ` Juergen Ilse
  0 siblings, 2 replies; 9+ messages in thread
From: Zach Forrest @ 2001-12-03  1:52 UTC (permalink / raw
  To: gentoo-dev

I noticed some discussion in November about /etc/profile, but it seems
to have trailed off. Are there any objections to adding the following?

if [ -e "${HOME}/.bash_profile" ]; then
      . ${HOME}/.bash_profile
fi


- Zach




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

* Re: [gentoo-dev] /etc/profile
  2001-12-03  1:52 [gentoo-dev] /etc/profile Zach Forrest
@ 2001-12-03  2:16 ` jano
  2001-12-03  3:02   ` Zach Forrest
  2001-12-03 23:55 ` Juergen Ilse
  1 sibling, 1 reply; 9+ messages in thread
From: jano @ 2001-12-03  2:16 UTC (permalink / raw
  To: gentoo-dev

I thought ~/.bash_profile was read without needing to source it directly in
the /etc/profile; at least, that's the way it works for me.  I also make the
symbolic link, ~/.bashrc to the ~/.bash_profile, for su's and non
shell-login xterms *shrug*

jano


> I noticed some discussion in November about /etc/profile, but it seems
> to have trailed off. Are there any objections to adding the following?
>
> if [ -e "${HOME}/.bash_profile" ]; then
>      . ${HOME}/.bash_profile
> fi
>
>
> - Zach
>
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev





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

* Re: [gentoo-dev] /etc/profile
  2001-12-03  2:16 ` jano
@ 2001-12-03  3:02   ` Zach Forrest
  0 siblings, 0 replies; 9+ messages in thread
From: Zach Forrest @ 2001-12-03  3:02 UTC (permalink / raw
  To: gentoo-dev

That was my understanding as well, but for some reason it doesn't do 
that for me so I've had to add it to /etc/profile. (Maybe I installed 
bash on the Wednesday before the last full moon between 5 and 6?)


Zach

jano wrote:

> I thought ~/.bash_profile was read without needing to source it directly in
> the /etc/profile; at least, that's the way it works for me.  I also make the
> symbolic link, ~/.bashrc to the ~/.bash_profile, for su's and non
> shell-login xterms *shrug*
> 
> jano
> 
> 
> 
>>I noticed some discussion in November about /etc/profile, but it seems
>>to have trailed off. Are there any objections to adding the following?
>>
>>if [ -e "${HOME}/.bash_profile" ]; then
>>     . ${HOME}/.bash_profile
>>fi
>>
>>
>>- Zach
>>
>>
>>_______________________________________________
>>gentoo-dev mailing list
>>gentoo-dev@gentoo.org
>>http://lists.gentoo.org/mailman/listinfo/gentoo-dev
>>
> 
> 
> 
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
> 
> 




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

* Re: [gentoo-dev] /etc/profile
  2001-12-03  1:52 [gentoo-dev] /etc/profile Zach Forrest
  2001-12-03  2:16 ` jano
@ 2001-12-03 23:55 ` Juergen Ilse
  1 sibling, 0 replies; 9+ messages in thread
From: Juergen Ilse @ 2001-12-03 23:55 UTC (permalink / raw
  To: gentoo-dev

Hello,

On Sun, Dec 02, 2001 at 05:52:12PM -0800, Zach Forrest wrote:
> I noticed some discussion in November about /etc/profile, but it seems
> to have trailed off. Are there any objections to adding the following?
> 
> if [ -e "${HOME}/.bash_profile" ]; then
>       . ${HOME}/.bash_profile
> fi

I think, it is not a good idea ...
If you start bash as login-shell, it should parse ${[HOME}/.bash_profile
if that file exists, so there should be no need for such a hack. If you
insert "bash-specific" commands to this file, you may get error-messages,
if you use some other shell that reads /etc/profile (for example ash, sash
or ksh). Please don't do such things like inserting something like source
~/.bash_profile in /etc/profile. /etc/profile should not be bash-specific
in any way.

ciao,
	Juergen Ilse					(ilse@asys-h.de)
-- 
Wenn ich auch nur aus jedem 1000. Bug in einem M$ Produkt|Juergen Ilse
einen Tag trauern wollte, also da muesste ich 300 Jahre  |Internet POP Hannover
alt werden und wuerde mehrere Dutzend schwarze Anzuege   |Vahrenwalder Str. 205
aufbrauchen. (Detlef Bosau in dcoulm)                    |30165 Hannover


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

* [gentoo-dev] /etc/profile
@ 2002-11-28  0:50 messdev
  2002-11-28  7:15 ` Alexander Gretencord
  0 siblings, 1 reply; 9+ messages in thread
From: messdev @ 2002-11-28  0:50 UTC (permalink / raw
  To: gentoo-dev

Why exporting global variables' mechanism is so complicated? It is not very 
,,user friendly'' to edit /etc/env.d/00basic to change some global variables, 
whitch then go to /etc/profile.env and then to /etc/profile... It's not 
intuitively. Or maybe there is some simpler way to edit it?


--
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] /etc/profile
  2002-11-28  0:50 messdev
@ 2002-11-28  7:15 ` Alexander Gretencord
  2002-11-28 23:07   ` messdev
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Gretencord @ 2002-11-28  7:15 UTC (permalink / raw
  To: gentoo-dev

On Thursday 28 November 2002 01:50, messdev wrote:
> Why exporting global variables' mechanism is so complicated?

Is it?

> It is not very ,,user friendly'' to edit /etc/env.d/00basic to change some
> global variables

Well, where's the problem? Instead of editing one file called /etc/profile you 
edit another file called /etc/env.d/something. How the mechanism of getting 
it into your shells environment works doesn't have to bother you.

> It's not intuitively. Or maybe there is some simpler way to edit it?

Well as said, what's not simple in editing _one_ file? You've always edited 
_one_ file.

Just think about what is achieved by this mechanism. It's a simple and good 
solution to a problem. And normal users usually don't change global settings 
anyway, but use their own .profile which is not affected by portage's 
handling of global profile entries. As a sysadmin you will appreciate 
gentoo's handling as packages can add to the global settings without messing 
around with the actual file.


Alex

-- 
"They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety."
Benjamin Franklin


--
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] /etc/profile
  2002-11-28  7:15 ` Alexander Gretencord
@ 2002-11-28 23:07   ` messdev
  2002-11-30 15:41     ` Martin Schlemmer
  0 siblings, 1 reply; 9+ messages in thread
From: messdev @ 2002-11-28 23:07 UTC (permalink / raw
  To: Alexander Gretencord; +Cc: gentoo-dev

Ok. But when you try to learn how to define global variables it is difficult 
to make an idea, that u should do it in /etc/env.d/*

When you look into /etc/profile you can see `source /etc/profile.env` - then, 
when you look into /etc/profile.env, everything points, that u should change 
definitions exacly in this file - i wanna say, that it is a good idea to put 
the comment into /etc/profile.env, that this file is genereting by using 
/etc/env.d/* files, and the definitions of variables there.

Or maybe i'm wrong... :)

Messer.

--
gentoo-dev@gentoo.org mailing list


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

* Re: [gentoo-dev] /etc/profile
  2002-11-28 23:07   ` messdev
@ 2002-11-30 15:41     ` Martin Schlemmer
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Schlemmer @ 2002-11-30 15:41 UTC (permalink / raw
  To: messdev; +Cc: Alexander Gretencord, Gentoo-Dev

On Fri, 2002-11-29 at 01:07, messdev wrote:
> Ok. But when you try to learn how to define global variables it is difficult 
> to make an idea, that u should do it in /etc/env.d/*
> 
> When you look into /etc/profile you can see `source /etc/profile.env` - then, 
> when you look into /etc/profile.env, everything points, that u should change 
> definitions exacly in this file - i wanna say, that it is a good idea to put 
> the comment into /etc/profile.env, that this file is genereting by using 
> /etc/env.d/* files, and the definitions of variables there.
> 

Nobody are stopping you from just adding what you need to the
bottom of /etc/profile ...


-- 

Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa



--
gentoo-dev@gentoo.org mailing list


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

end of thread, other threads:[~2002-11-30 15:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-03  1:52 [gentoo-dev] /etc/profile Zach Forrest
2001-12-03  2:16 ` jano
2001-12-03  3:02   ` Zach Forrest
2001-12-03 23:55 ` Juergen Ilse
  -- strict thread matches above, loose matches on Subject: below --
2002-11-28  0:50 messdev
2002-11-28  7:15 ` Alexander Gretencord
2002-11-28 23:07   ` messdev
2002-11-30 15:41     ` Martin Schlemmer
2001-01-14 15:48 Morgan Christiansson

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