Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 04-24-2004, 01:11 PM   #1
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
run a script once at login?

How would a person run a script automatically only the first time they login. If you were to add it to .bashrc it would be rerun everytime you open up a new terminal, which I do not want. I do not want to use .xinitrc, because I may or may not log into X. Is this what .bash_login is used for, I can't seem to find the info I need?
Old 04-24-2004, 03:05 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
I would believe it needs to go in .bash_login and not .bashrc as .bash_login is read after the user logs in and not just opening a new terminal, etc.
Old 04-25-2004, 11:32 AM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Originally posted by masand
hi there
i am facing some problem here
i have added
xhost +mymachineip

in .bash_profile

when i login into kde
it does get executed but when i go to icewm it does not
pl. help
This has nothing to do with the original thread starters question. Please do not hijack others threads when they have yet to get a solution or have confirmed the solution given worked.

I have reported this post and have asked to be split off to make its own thread, which should have been done the first time.


{edit} Ignore this now, the hijacker's post has been split off. {/edit}

Last edited by trickykid; 04-25-2004 at 12:12 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Ubuntu How to run Python script on Login? warnetgm Linux - General 14 03-13-2012 07:11 PM
How to run a script as root upon login zugvogel Linux - Newbie 7 09-09-2005 12:10 PM
How to run a Script as root, after Login as User, in GDM MHOOO Red Hat 14 03-08-2005 09:41 AM
run a script once at login? masand Linux - Software 4 05-02-2004 10:41 AM
Run script at login instead of bash uzi4u Linux - General 2 04-28-2004 03:31 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:22 PM.

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