Re: Loading .bash_profile under X-Windows

2005-04-11 Thread Sandy Rutherford
> On Mon, 11 Apr 2005 01:12:25 -0700, 
> "Loren M. Lang" <[EMAIL PROTECTED]> said:

 > On Sat, Apr 09, 2005 at 10:40:01AM +0200, Kiffin Gish wrote:
 >> How can I get terminal under X-Windows to load my .bash_profile (and any
 >> other stuff) that is usually loaded when at the initial prompt?
 >> 
 >> A more general question might be: what files (.profile, .login, whatever)
 >> and in what order are loaded every I login via a shell and how are these
 >> settings propagated up through Gnome desktop?

 ...snip...

 > The first shell was just started normally and the second was started as
 > a login shell.  Connecting to a machine through ssh or logging in on a
 > text console starts a login shell, but running an xterm in X-Windows or
 > running bash from whatever shell your already in isn't since your
 > already logged in.  If you start X-Windows with the startx command, your
 > login is considered when you first logged in on the text console and
 > that same environment is propagated to the gui environment, gnome in
 > your case.  When you log in from a graphical log in utility, it's a
 > little more complicated.  The gui login program, whether it be xdm, gdm,
 > or kdm starts a shell script which eventually starts your gui
 > environment.  The problem is that it's not usually the same as your
 > login shell, but whatever shell was used to write the script.  In some
 > cases you can write your own shell script called .xsession or .Xclients
 > in your home directory and it can load in .bash_profile and then start
 > gnome.

Depending on what kind of stuff you put in your .bash_profile file, I
have found it convenient to separate the bits that I would like to be
run by the gui login program from what I would like to be run when I
login via ssh or a terminal.  I do this by putting all environment
variable settings in a file, .bash_env.  Both my .bash_profile and
.xsession files source this file.

Sandy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Loading .bash_profile under X-Windows

2005-04-11 Thread Loren M. Lang
On Sat, Apr 09, 2005 at 10:40:01AM +0200, Kiffin Gish wrote:
> How can I get terminal under X-Windows to load my .bash_profile (and any
> other stuff) that is usually loaded when at the initial prompt?
> 
> A more general question might be: what files (.profile, .login, whatever)
> and in what order are loaded every I login via a shell and how are these
> settings propagated up through Gnome desktop?
.bash_profile, .profile, .login are read on login shells only.  When a
shell is invoked by the exec() syscall, it's name is prepended with a -
to mean it's a login shell and most shells work differently like reading
.profile.  For example running ps ax|grep bash on my system yields:

...
81288  q1  Is 0:00.02 bash
88710  q3  Is 0:00.03 -bash (bash)
...

The first shell was just started normally and the second was started as
a login shell.  Connecting to a machine through ssh or logging in on a
text console starts a login shell, but running an xterm in X-Windows or
running bash from whatever shell your already in isn't since your
already logged in.  If you start X-Windows with the startx command, your
login is considered when you first logged in on the text console and
that same environment is propagated to the gui environment, gnome in
your case.  When you log in from a graphical log in utility, it's a
little more complicated.  The gui login program, whether it be xdm, gdm,
or kdm starts a shell script which eventually starts your gui
environment.  The problem is that it's not usually the same as your
login shell, but whatever shell was used to write the script.  In some
cases you can write your own shell script called .xsession or .Xclients
in your home directory and it can load in .bash_profile and then start
gnome.

> 
> Thanks a lot in advance. 
> 
> -- 
> 
> Kiffin Rex Gish
> Gouda, The Netherlands
> 
>  
> 
> 

> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"


-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA  C415 6D35 E847 0118 A3D2
 


pgpcvFFOATIxw.pgp
Description: PGP signature


Re: Loading .bash_profile under X-Windows

2005-04-09 Thread Nico Meijer
He Kiffin,

> How can I get terminal under X-Windows to load my .bash_profile (and
> any other stuff) that is usually loaded when at the initial prompt?

Run `xterm -ls`. Then read its man page. ;-)

Bye... Nico
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Loading .bash_profile under X-Windows

2005-04-09 Thread Kiffin Gish
How can I get terminal under X-Windows to load my .bash_profile (and any
other stuff) that is usually loaded when at the initial prompt?

A more general question might be: what files (.profile, .login, whatever)
and in what order are loaded every I login via a shell and how are these
settings propagated up through Gnome desktop?

Thanks a lot in advance. 

-- 

Kiffin Rex Gish
Gouda, The Netherlands

 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"