-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 30 December 2001 06:43 pm, John P Verel wrote:

Hi John,

> As I use gnome with the gnome display manager, I end up starting
> /etc/X11/xdm/Xsession, passing the argument "gnome-session".  I have
> this line in my Xsession, at line number 93:
>
>        exec -l $SHELL -c "gnome-session"
>
> Am I correct that this replaces the currently active login shell with a
> new one?  The -l options would seem to indicate a new login shell; the
> -c "gnome-session" passed as an argument.
>
> If I've got this right, the "substitute" shell, invoked as a login
> shell, would cause re-sourcing of /etc/profile and ~/.bash_profile,
> in turn causing the path issue.

Perhaps I'm missing something here. Aren't the path modifications in 
/etc/profile conditional? If they are already in the users path, they 
shouldn't be added again. That being the case, re-sourcing that file 
shouldn't affect your path.

My situation isn't quite the same as yours, I start in run level 3, and 
then startx manually, which in my case starts a KDE session. (And no, I 
don't have a good reason for not starting in run level 5, old habits are 
hard to break.) Once in X, I usually have 2 or 3 konsole windows, with 4 
or 5 shells open in each.

I have seen duplicate path entries, but in all cases so far, they were 
caused by either my additions or 3rd party software. For example, I added 
an entry to /etc/profile to add a java path and didn't make it 
conditional. My path ended up having several entries for the java path. I 
modified the entry to look like:

if ! echo $PATH | /bin/grep -q "/usr/java/jre1.3.1/bin" ; then
  PATH="/usr/java/jre1.3.1/bin:$PATH"
fi

That solved that problem.

Next, I installed sun's star office 6. The install of adabas added an 
entry to ~/.bashrc which made a mess of my path. 
The entry looked like:

# by Sun Microsystems setup
DBROOT=/home/devon/adabas
DBWORK=/home/devon/adabas/sql
DBCONFIG=/home/devon/adabas/sql
PATH=$DBROOT/bin:$DBROOT/pgm:$PATH
LD_LIBRARY_PATH=$DBROOT/lib:$LD_LIBRARY_PATH
export DBROOT DBWORK DBCONFIG PATH LD_LIBRARY_PATH

I ended up with a PATH and LD_LIBRARY_PATH several lines long because of 
the above path additions being repeated.

I changed the PATH sections to:

if ! echo $PATH | /bin/grep -q "$DBROOT/pgm" ; then
PATH=$DBROOT/pgm:$PATH
fi
if ! echo $PATH | /bin/grep -q "$DBROOT/bin" ; then
PATH=$DBROOT/bin:$PATH
fi
if ! echo $LD_LIBRARY_PATH | /bin/grep -q "$DBROOT/lib" ; then
LD_LIBRARY_PATH=$DBROOT/lib:$LD_LIBRARY_PATH
fi

The $PATH being repeated seems to have been solved. 
If I'm way off base, just ignore me. ;)

Hope that helps,

- -D

- -- 

pgp key:  http://www.tuxfan.homeip.net:8080/pgpkey.txt

- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8L9uZeMAUbzJhSVcRArf5AJ9iW1PIHCjJp0H5aC5Rd+4jv5psZQCgt/rr
eqptYTcN+BSPHQ0T+T8FL44=
=Xyh9
-----END PGP SIGNATURE-----



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to