LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-05-2006, 08:07 PM   #1
soulxcavtor
Member
 
Registered: May 2006
Location: USA.FLorida
Distribution: Mandriva 2006 PowerPack
Posts: 238

Rep: Reputation: 30
Shell Script at login


I have a simple shell script i wrote for Linux in vi.. Just basically displays date and login name and time and some other simple things...I want this script to display when I log in, I dont auto boot into KDE so as soon as I log in through konsole I want it to display, how can I do this?

Thanks!
 
Old 06-05-2006, 08:14 PM   #2
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Before you do too much, check out information on /etc/motd (Message of the Day), and see what you think.

Regards,

Alunduil
 
Old 06-05-2006, 08:14 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
call it from your .bash_profile
 
Old 06-05-2006, 09:36 PM   #4
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slackware 14.2
Posts: 849

Rep: Reputation: 33
If you want your script to run every time you run a terminal then put it in your .bashrc. Put it in your .bash_profile if you only want it to run for login purposes. It's better to keep your .bash_profile clean. You can put...
Code:
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
In your .bash_profile and it'll read your .bashrc file when you log in and every time you launch a terminal.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check in a script whether the shell is login or non login? frankie_DJ Programming 7 10-21-2015 10:09 AM
Use a shell script to do login and other commands jpan Linux - General 15 01-12-2005 06:52 AM
Shell script login command? chup Linux - General 3 08-24-2003 06:43 PM
login message shell script? jczr2 Linux - Newbie 22 05-28-2003 09:10 PM
telnet login via shell script lethe Linux - General 8 05-13-2002 09:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration