bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATH value doesn't get updated


From: Bob Proulx
Subject: Re: PATH value doesn't get updated
Date: Wed, 14 May 2008 00:55:51 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Carl Wenrich wrote:
> I just log into the box that appears on the standard ubuntu
> startup. I enter my username and password, then the desktop comes
> up.

You are using GDM (GNOME Display Manager) then.  In which case it
won't automatically start up shells as login shells.  It is a quirk of
how the X session is started.

> I see now that the .bash_profile isn't being sourced (I thought it
> was according to what I've been able to pick up on the web). If I
> source it manually, the $PATH gets updated.

It would be sourced if you were to log into your machine with ssh or
the text console.

> Why does ubuntu provide the .bash_profile when a user is created,
> and then not source it when the system starts up? And since it
> doesn't, what do I change to make it happen?

That is a long story.  If you are interested you can read some
archeology that has been done on this problem at this following URL.
Note that even though the bug has been closed that it isn't fixed.  I
am hoping to getting back to driving on it again one day.

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765

Red Hat's solution seems to be the best.  But it would require you to
patch your system files.

I recommend creating a $HOME/.xsession file, making it executable,
with the following contents.  Make sure it is executable.

  #!/bin/bash --login
  exec x-session-manager  # Debian specific generic alternative.
  #exec gnome-session
  #exec startkde
  #exec fvwm2

  chmod a+x ~/.xsession

This invokes bash as a login shell and then invokes the X session
manager.  x-session-manager is an "alternative" in Debian and will
automatically track the best installed manager.  But others may be
selected explicitly.  (I use fvwm. :-)

This is off topic for the bash list.  If you have further problems the
Ubuntu user mailing list would probably be your best place for more
help about how to configure your Ubuntu system.  If you contact me
offlist I would continue to help you if you have problems with setting
up an ~/.xsession file.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]