Jerry L Kreps <JerryKreps@alltel.net> wrote:
In my RH days, when I wanted to set conditions for a specific user I would use .profile in their home directory.
It's the same with SuSE.
Unless I misunderstand the SuSE boot and login process, the file /etc/profile.local is called when a user logs in and is the place to set conditions for all users, apparently.
Yes, when a user logs in /etc/profile and ~/.profile are read. While /etc/profile holds system wide settings, ~/.profile can be used for user specific settings. So far there is no difference between Redhat and SuSE (this is normal bash behaviour). SuSE additionally provides /etc/profile.local (which is read by /etc/profile) as a place where to put own system wide settings without changing the /etc/profile given by the distribution.
My question: which file is used to set conditions for a specific user?
~/.profile Eilert -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eilert Brinkmann -- Universitaet Bremen -- FB 3, Informatik eilert@informatik.uni-bremen.de - eilert@tzi.org - eilert@linuxfreak.com http://www.informatik.uni-bremen.de/~eilert/ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Fri, Feb 18, 2000 at 06:08:08PM +0100, Eilert Brinkmann wrote:
Jerry L Kreps <JerryKreps@alltel.net> wrote:
In my RH days, when I wanted to set conditions for a specific user I would use .profile in their home directory.
It's the same with SuSE.
Unless I misunderstand the SuSE boot and login process, the file /etc/profile.local is called when a user logs in and is the place to set conditions for all users, apparently.
Yes, when a user logs in /etc/profile and ~/.profile are read. While /etc/profile holds system wide settings, ~/.profile can be used for user specific settings. So far there is no difference between Redhat and SuSE (this is normal bash behaviour). SuSE additionally provides /etc/profile.local (which is read by /etc/profile) as a place where to put own system wide settings without changing the /etc/profile given by the distribution.
Actually, if you're using the default SuSE install, ~/.profile says, "Yes. I'm here, but use ~/.bashrc instead." So, make your user specific changes in ~/.bashrc -- Brad Shelton On Line Exchange http://online-isp.com -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On 18 Feb, Brad Shelton wrote:
Actually, if you're using the default SuSE install, ~/.profile says, "Yes. I'm here, but use ~/.bashrc instead."
So, make your user specific changes in ~/.bashrc
One thing to think about is that the ~/.profile as well as /etc/profile* is only read by the login shell. So if you are running a window manager like most do, then any shell that you open up only read ~/.bashrc. That is if you are running bash of course. The same reasoning holds for most of the different shells. This is a useful feature because than you can put things in your ~/.profile that you only want to run at login time, and things that need to be run for all invocations in ~/.bashrc. As an example: I have this in my ~/.profile as I don't run a graphical login like kdm or xdm. This question will only pop up when I login, not in any subsequently started shells.
-------------------<
echo "Start X? " read ans if [ "$ans" = "" ] then startx kde logout fi
-------------------<
TJo -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Thanks everyone, Here's was what was confusing me... In RH ~/.profile existed, but I've never seen one in any of my SuSE installs (since 5.3) and didn't know if, when a user logs in, ~/.profile would be read. Apparently it does. (Belive it or not, since I only ran as a user I always put stuff in boot.local, because it worked. Bad habit... but easily broken when the right way is revealed...) So, you are saying that on loging in... a) /etc/profile is read (where SuSE puts it's commands for all users...then b) /etc/profile.local is read, where users put their commands for all users... then c) ~/.profile and ~/.bashrc is read (we're still at login) where commands are put for specific users... and then, d) when running KDE, for example, and you open a term, ~/.bashrc is read but ~/.profile is not. Do I have things sorted out correctly? JLK tjo@telia.com wrote:
On 18 Feb, Brad Shelton wrote:
Actually, if you're using the default SuSE install, ~/.profile says, "Yes. I'm here, but use ~/.bashrc instead."
So, make your user specific changes in ~/.bashrc
One thing to think about is that the ~/.profile as well as /etc/profile* is only read by the login shell. So if you are running a window manager like most do, then any shell that you open up only read ~/.bashrc. That is if you are running bash of course. The same reasoning holds for most of the different shells.
This is a useful feature because than you can put things in your ~/.profile that you only want to run at login time, and things that need to be run for all invocations in ~/.bashrc.
As an example:
I have this in my ~/.profile as I don't run a graphical login like kdm or xdm. This question will only pop up when I login, not in any subsequently started shells.
-------------------<
echo "Start X? " read ans
if [ "$ans" = "" ] then startx kde logout fi
-------------------<
TJo
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On 18 Feb, Jerry L Kreps wrote:
Thanks everyone,
Here's was what was confusing me... In RH ~/.profile existed, but I've never seen one in any of my SuSE installs (since 5.3) and didn't know if, when a user logs in, ~/.profile would be read. Apparently it does. (Belive it or not, since I only ran as a user I always put stuff in boot.local, because it worked. Bad habit... but easily broken when the right way is revealed...)
So, you are saying that on loging in... a) /etc/profile is read (where SuSE puts it's commands for all users...then b) /etc/profile.local is read, where users put their commands for all users... then c) ~/.profile and ~/.bashrc is read (we're still at login) where commands are put for specific users...
and then, d) when running KDE, for example, and you open a term, ~/.bashrc is read but ~/.profile is not.
Do I have things sorted out correctly? JLK
Nicely sorted they are. TJo -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (4)
-
bshelton@online-isp.com
-
eilert@informatik.uni-bremen.de
-
JerryKreps@alltel.net
-
tjo@telia.com