How to display message when starting a terminal


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to display message when starting a terminal
# 1  
Old 05-26-2009
Question How to display message when starting a terminal

Hello all,

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?

Thanks in advance
# 2  
Old 05-26-2009
in your home dir you can find a .profile file.

If not create it

inside the file you can add display for your welcome message using echo or banner
# 3  
Old 05-26-2009
Thanks for your response Amit.

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?

Thanks
# 4  
Old 05-26-2009
when you will login again the .profile will be executed and message will be displayed . Make sure that .profile has the correct permission ro read
# 5  
Old 05-26-2009
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 Smilie ... y is that
# 6  
Old 05-26-2009
Quote:
Originally Posted by mrudula009
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 Smilie ... y is that
welcome.profile?? is that your .profilename??? or you changed it??
what have you included in that please post it
# 7  
Old 05-26-2009
I am just a beginner in shell scripting so please forgive me for my mistakes.

Yes, that's the profile name i gave welcome.profile in the dir /home

Code:

echo Welcome to Fedora !!
echo Today is
cal

Please correct me
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Colorful message is displayed in the terminal but not in the log file

Is there any way to print the colorful message in the terminal (which is the output of a simulation) to the log file with the same color. The colorful message at the terminal is obtained by the following codes: /////////////codes start here/////////////////////////////////////// ... (5 Replies)
Discussion started by: babunp114525
5 Replies

2. Ubuntu

Error starting terminal in Ubuntu 14.04.3

I am unfamiliar with below error and how to fix it, it happens when I start the terminal in Ubuntu 14.04.3. I do not send any command only press crtl+alt+T. It seems to indicate that something is missing from PATH but I’m not really sure what. Thank you :). Command 'lesspipe' is... (24 Replies)
Discussion started by: cmccabe
24 Replies

3. Windows & DOS: Issues & Discussions

Start X Server without starting a terminal

when I run C:\cygwin\bin\run C:\cygwin\bin\startxwin.exe it fires up a terminal by default. Can I eliminate that terminal and start the x server as a service silently and sits in my status bar just there? Thanks Jack (0 Replies)
Discussion started by: lucky7456969
0 Replies

4. Shell Programming and Scripting

When trying to open file Message:-Terminal too wide?

Hi, I am trying to open small size file only in vi editor on solaris or Linux machine but it giving message "Terminal too wide" and then I have to come out. As shown below:- -rwxr-x--- 1 rkycadm rkycprd 2445 Sep 12 04:06 $ vi file.txt Terminal too wide :q! ----------... (2 Replies)
Discussion started by: RahulJoshi
2 Replies

5. OS X (Apple)

How to prompt for login on OSX when starting Terminal

I was wondering if anyone can tell me how to log back in to unix after logging out. I have a MBPro. If I don't have the window close after exiting, then there is the phrase 'process completed' in brackets with a blinking cursor, but I can't type anything in. Is it also possible to start the... (4 Replies)
Discussion started by: Straitsfan
4 Replies

6. UNIX for Dummies Questions & Answers

Starting terminal with shortcut key combination

How can the shortcut keys be defined that would open up a terminal window? When using a kvm switch, the mouse sometimes does not work, but the keyboard does, and by opening up a terminal window using a shortcut key combination, the mouse can be restarted by entering the predefined mouserestart... (0 Replies)
Discussion started by: figaro
0 Replies

7. Shell Programming and Scripting

Write a message on specific user terminal

Hi All, Need urgent help!!! Can anyone tellme how can we send a message on specific user terminal and get a response from user in return. Thanks in advance. (3 Replies)
Discussion started by: Sadhana
3 Replies

8. Shell Programming and Scripting

date and time to display on the terminal

hi all, am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times. code sniplet i am using is : grep -i 'text to grep' Out.log | while read LINE; do ... (11 Replies)
Discussion started by: cesarNZ
11 Replies

9. Shell Programming and Scripting

sending message to terminal

hi all i have script #!/bin/bash cd /usr3/prod grep ERROR /usr3/prod/ind.log > /usr3/prod/ind_err.log if test -s /usr3/prod/ind_err.log then echo "error during process" else echo "process succeed" fi i want that this message(echo) will be display one time at the top of the screen... (5 Replies)
Discussion started by: naamas03
5 Replies

10. UNIX for Dummies Questions & Answers

terminal display

I want to display a system warning message at the prompt of every live terminal on a sun solaris 8 machine using CDE. I know this can be done on a console, but what about dtterm and xterm regular windows? Does anyone know how this is done? What about a single terminal? Clear skies,... (2 Replies)
Discussion started by: seismic_willy
2 Replies
Login or Register to Ask a Question