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 02-19-2005, 06:14 AM   #1
Brad Richards
LQ Newbie
 
Registered: Feb 2005
Distribution: SUSE 9.2
Posts: 2

Rep: Reputation: 0
initialization files run multiple times


I've searched for a couple of hours on the Internet, but can't seem to find the answer to this... I'm running SUSE 9.2 (first ever Linux system), and am far enough along that I want to customize a few things: alter the path for individual users, start a couple of applications on login, etc, etc.

When a user logs into the system, two personal initialization files are called: .bashrc and .profile. This is no surprise. But neither .bash_profile nor .bash_login seems to be called. At least, if I modify PATH in these files, the modifications never take effect.

My problem is this: .bashrc is called three times, and .profile is called twice. This means that whatever initialization I put into these files is repeated. For aliases and the like, this doesn't matter. But for PATH, starting apps, and other things, it matters a lot.

Two possible solutions, but I don't know how to do either:

- prevent multiple invocations of these files

- find some other file (bash_profile, bash_login) that is only called once. But - as mentioned above - these currently seem *never* to be called.

Any help appreciated...

Brad
 
Old 02-19-2005, 09:34 AM   #2
TroelsSmit
Member
 
Registered: Feb 2004
Location: Denmark
Distribution: Debian / Suse
Posts: 223

Rep: Reputation: 30
according to "man bash", bash_login is only run if you log into your system using a bash login screen. My guess is that you are using KDE or GNOME to do the login. You can try their login files.

KDE: ~/.kde/Autostart/kde_start.sh

and the raeson that .bachrc seems to be called many times is probably that it is called everytime a terminal is started.
 
Old 02-19-2005, 11:56 AM   #3
Brad Richards
LQ Newbie
 
Registered: Feb 2005
Distribution: SUSE 9.2
Posts: 2

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the reply. Yes, I am using KDE. And it does seem likely that the multiple executions of .bashrc are because of KDE starting things. But - as I understand the documentation, ".profile" is really only supposed to be executed once, not twice - and this should not be affected by whatever KDE is up to in its initializaiton process.

Putting things in the KDE-startup files may be a solution, but surely it is not the right one. When one logs into the system, this is (as I understand it) before the window manager has started. I would think that one ought to set PATH, and similar things, at that level - independent of KDE or any other window manager.

Cheers,

Brad
 
  


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
Konqueror opens multiple times sploit Linux - Newbie 18 07-14-2007 09:11 AM
same email, multiple times ?? (exchange... sorry) itsjustme General 1 01-14-2005 03:33 PM
running wget multiple times quickk Linux - Newbie 1 09-16-2004 07:53 AM
run script on multiple files statmobile Programming 6 07-17-2004 12:35 AM
PC Card Initialization error when trying to run RedHat Linux 7.1 installer. iyusuff Linux - Software 1 09-05-2001 07:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 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
Open Source Consulting | Domain Registration