LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2003, 07:18 PM   #1
DeanB
LQ Newbie
 
Registered: Sep 2003
Location: Portland, OR
Posts: 3

Rep: Reputation: 0
.bash_profile and .bashrc file frustrations


I have added the programs I want to execute at login, to the .bash_profile, but they aren't starting automatically when the user logs in.

Am I missing something?

Thanks,
Dean
 
Old 09-15-2003, 07:31 PM   #2
g00$e
Member
 
Registered: Sep 2003
Location: Norfolk, VA
Distribution: Slackware
Posts: 119

Rep: Reputation: 15
Just out curiousity do you want these programs to start when the user begins an X session or when they log in from the terminal?
 
Old 09-15-2003, 07:50 PM   #3
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
apart from gOO$e's question which is quite pertinent, I usually put stuff in .bashrc and not in .bash_profile. works for me. This will have things start every time you start a konsole, for instance. If you don't want this, you'll have to place the things elsewhere.
 
Old 09-15-2003, 08:27 PM   #4
DeanB
LQ Newbie
 
Registered: Sep 2003
Location: Portland, OR
Posts: 3

Original Poster
Rep: Reputation: 0
All of the users will log in via the console for now.

So, if that is the case, then it sounds like everything should go in the .bashrc file, correct?
 
Old 09-15-2003, 08:43 PM   #5
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
sounds right. For the long term, it might be simpler to have a script that actually calls all the programs you want. From the .bashrc you'd simply call the script - one line. This way, you won't have to edit the .bashrc files of each user whenever you want to change things. Just edit the script. I am assuming that you want to start the same programs for all users.
 
Old 09-15-2003, 08:46 PM   #6
g00$e
Member
 
Registered: Sep 2003
Location: Norfolk, VA
Distribution: Slackware
Posts: 119

Rep: Reputation: 15
I believe the difference between .bash_profile and .bash_rc is that one (.bash_profile) is read when using a log-in shell and the other (.bash_rc) is used when bash is invoked.

As far as the syntax check out the Advanced Bash Scripting Guide if you are having problems getting things to execute.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc and .bash_profile happy78 Programming 5 10-19-2005 04:26 PM
bashrc or bash_profile ? ARCIS_house Linux - Newbie 6 07-21-2005 02:09 PM
.bashrc .bash_profile Soulful93 Slackware 4 05-03-2005 03:02 AM
~/.bashrc, ~/.bash_profile Sinope Linux - Newbie 6 08-17-2004 02:40 AM
.bashrc vs .bash_profile xor3 Linux - Newbie 1 08-16-2003 12:52 PM


All times are GMT -5. The time now is 02:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration