File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes how to customize the user environment using the .profile file in redhat(fedora)? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to customize the user environment using the .profile file in redhat(fedora)?" Watch "how to customize the user environment using the .profile file in redhat(fedora)?" New topic
Author

how to customize the user environment using the .profile file in redhat(fedora)?

minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
I want to customize the user environment using the .profile file?
How will I do that?


Minal Silimkar
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959



SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
I created $HOME/.profile file in my home directory with following contents

echo "Welcome $USER"

I logged out & logged in.I must get the message

Welcome root

But I am getting same logging message as that of normal login (i.e. Date is getting displayed).

I have .bash_profile file already in the home directory. Is it the reason that I am not getting result as I want.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Redhat doesn't look for a .profile file.

It looks for .bash_profile which, in turn, sources .bashrc.
You can put your custom settings in either of those two files.

Or, if for some reason you feel they need to be put in a file named .profile,
just add an entry into .bash_profile which sources your .profile file.



Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
Thank you.
Your solution worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to customize the user environment using the .profile file in redhat(fedora)?