I would like a message to be displayed on the shell when someone opens up the terminal - something like a welcome msg with date and time. I know how to do this by running the shell commands but dont know how to display it when a user opens up the terminal?
I created the .profile file. But without me executing the file, I want it to display the file contents. Can u pls tell me how I can achieve this? Is there any boot file or something i might have to modify so that I can ask the shell to execute this .profile?
I have created welcome.profile in /home and it does have the reqd permissions to read ... i tried to log in again but still it doesnt show my msg ... y is that
ok do the following steps
1)login
2)vi .profile
3)shift G then press o
4)type banner "message"
5)save :wq
6)exit or ctrl+d
7)login again it should dispaly the message
I use fedora - boots fedora - it asks for password when i click on my login account - after typing the password it comes to the desktop - then i open Applications -> System Tools -> Terminal.
I do not get a msg here when i open the terminal. To log in again, i exit from the terminal by pressing ctrl + d. I click on System->Log out user and then log in again to open the terminal.
This is what I do. To get the welcome msg shud i do something else?
I wanna get atleast this small thing done first .. only then i can proceed to the next level .. so pls help
It will depend on the shell you are using. If you are using bash shell, it may be .bash_profile on your home directory. So include your banner msg in the .bash_profile.
After making the changes on the .bash_profile on your home directory, did you logout and login again?. Again, as I said, the .bash_profile must be on your home directory.
Hey thanks!! That works - source .bash_profile prints my msg !! Can u pls tell me something more on 'source'
But i just tried to open another terminal - but the msg is not displayed .. but when i type source _bash.profile the msg is displayed ... how can i get it displayed without typing this each time?