LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-11-2005, 12:42 PM   #1
LinuxHobbit
Member
 
Registered: Jan 2004
Posts: 30

Rep: Reputation: 15
Strange double invocation of /etc/profile


Hi gang.

Hey, for those of you who are much more savvy with SUSE's boot/init process, I'd certainly appreciate your insight into what I consider to be a somewhat strange phenomenon that occurs within my 9.3 Pro distro.

After I successfully completed a full install of the new SUSE 9.3 Pro distro a week or so ago, I immediately went about doing some of the usual things to customize my bash shell environment, such as add my own alias definitions, PATH variable settings, etc. In doing so, I noticed that things didn't seem to be operating as I intended. Specifically, the behavior my of local ".profile" file seemed to be kinda strange. In order to try and find out what was happening, I added some simple "echo" commands to the following files :

/etc/profile
/etc/profile.local
/etc/bash.bashrc
/etc/bash.bashrc.local

/home/joeblow/.profile
/home/joeblow/.bashrc

Note : The username "joeblow" is just a pseudonym that I'm using for this open forum.

The simple "echo" commands print out some text strings to a file within my home directory. After rebooting my machine, here's the sort of thing I'm seeing :

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following messages were generated *after* a reboot :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a note from the START of file /etc/PROFILE
PPID = 6603
This is a note from file /etc/PROFILE.LOCAL
This is a note from the START of file /etc/BASH.BASHRC
This is a note from file /etc/BASH.BASHRC.LOCAL
This is a note from the END of file /etc/BASH.BASHRC
This is a note from file /home/joeblow/BASHRC

This is a note from the END of file /etc/PROFILE
PPID = 6603

This is a note from file /home/joeblow/PROFILE
Variable Test : PROFILEREAD = |true|
PPID = 6603

This is a note from the START of file /etc/PROFILE
PPID = 6603
This is a note from file /etc/PROFILE.LOCAL
This is a note from the START of file /etc/BASH.BASHRC
This is a note from file /etc/BASH.BASHRC.LOCAL
This is a note from the END of file /etc/BASH.BASHRC
This is a note from file /home/joeblow/BASHRC

This is a note from the END of file /etc/PROFILE
PPID = 6603
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The thing that's causing me to scratch my head is that, for some reason, /etc/profile is being run twice, which doesn't make a whole lot of sense to me. From the above listing, you'll note that as soon as my local ".profile" has finished being executed, /etc/profile is re-run. At first, I thought this was due to some strange and/or un-necessary command within my local ".profile", but, after checking things, this doesn't appear to be the case. As far as I can tell, there is some other process that, for whatever reason, is causing the invocation of /etc/profile a 2nd time, which kinda messes up my own local environment settings. Obviously, I'm not understanding something here, but it just doesn't seem to me that /etc/profile needs to be called twice.

Also from the above listing, you'll note that I was looking at the "PPID" variable in an attempt to try and determine what process might be responsible for this "dual invocation". Based upon the PPID that was printed out, I used the "ps -ef" command to take a look at the running processes on my computer. Note the following :

root 6558 1 0 11:47 ? 00:00:00 /opt/kde3/bin/kdm
root 6582 6558 2 11:47 ? 00:00:11 /usr/X11R6/bin/X -br -nolisten tcp :0 vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-yV5m6C
root 6602 1 0 11:47 ? 00:00:00 /usr/sbin/hald --daemon=yes
root 6603 6558 0 11:47 ? 00:00:00 -:0

Note that process 6603 has a very strange name (the "-:0" thingy) and that it is spawned by process 6658, which belongs to the KDE stuff. I'm wondering if KDE is kicking off /etc/profile a 2nd time, and, if so, if it's really necessary. Perhaps the KDE windowing stuff does, indeed, require some sort of double invocation of some of the bash enviroment stuff.

This is not really what I'd call a "show stopper", obviously, but I'd be curious if any of you are seeing a similar phenomenon and, if so, if there's a legitimate reason why either KDE or another process needs for /etc/profile to be executed a 2nd time. I can always "work around" this thing by setting some unique flags within my local ".profile" file, but I've never had to do this before.

Anywho, THANKS for any info and/or insight some of you might be willing to toss my way.

Rock on, Linux Penguins !!!
 
  


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
Double the desktop, not double the fun! bizshop SUSE / openSUSE 3 08-26-2005 12:22 PM
:-( Limewire installation: "Invocation of this Java Application has caused an Invoc" michelbehr Linux - Software 4 01-23-2005 09:54 AM
defining wm behaviour on app invocation unholy Programming 0 12-24-2004 02:10 PM
strange, strange alsa problem: sound is grainy/pixellated? fenderman11111 Linux - Software 1 11-01-2004 05:16 PM
visor:Bad USB agent invocation Hexman Linux - Software 0 05-12-2004 12:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:35 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