LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 01-24-2006, 02:53 PM   #1
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 30
Run Bash Script @ login


Hello,

I created a bash script that I run after I login to X11 (KDE); I boot to init 3 then I run startx. I was wondering if it is possible to automate the script to run after I login from the bash prompt. If this is possible, what do I have to edit to make this work?

Thanks in advance!
 
Old 01-24-2006, 02:58 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,032

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
.bash_profile (alternately, .bashrc) in your $HOME directory.
 
Old 01-24-2006, 07:33 PM   #3
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
.bash_profile will execute only at login, .bashrc executes everytime you start a shell
 
Old 01-26-2006, 06:32 PM   #4
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 245

Rep: Reputation: 31
You might want to try adding your script to .xinitrc if you only want it to run when you "startx".

Last edited by camelrider; 01-26-2006 at 06:34 PM.
 
Old 01-26-2006, 09:46 PM   #5
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Original Poster
Rep: Reputation: 30
thanks for ALL your help!
 
Old 01-26-2006, 11:05 PM   #6
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Your all wrong, use .bash_login in your users home directory to run bash scripts upon login..
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run my bash script as a daemon. jaimese Linux - Newbie 12 02-10-2011 04:28 PM
how to run one bash script from within another? babag Programming 9 04-28-2005 01:12 AM
bash login script bunnyknight13 Linux - Newbie 4 09-10-2004 09:02 PM
bash login script seanatis Programming 6 09-06-2004 09:00 AM
Run script at login instead of bash uzi4u Linux - General 2 04-28-2004 03:31 PM


All times are GMT -5. The time now is 08:53 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration