Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: login shell or not



On Thu, Oct 14, 2004 at 07:15:52PM +0200, Francis Derive wrote:
: 
: When I start an Xterm, I can quit the window only but with "exit"
: ( doing "logout" explicitly says "not login shell" ).
: I am surprised - shouldn't I be ?

Yes, you should be surprised.

: Because when I start a Terminal session, I can quit the window doing a 
: "logout" ( "exit" do it also ) - but I am not surprised, as I 
: understand in both cases I am running login shells. I was wrong ?
: how ?  and why this difference ?

When you launch xterm, the shell it runs is an interactive shell,
but not an interactive *login* shell.  As mentioned by another post,
you can change xterm's behavior via "xterm -ls" which tells xterm to
start a login shell.

Another method to include your login shell settings (and I will use
bash for my examples) is to move all of your settings into your
interactive shell init file (~/.bashrc) and have your login shell
init file (~/.bash_profile) read your interactive shell init file
(in your ~/.bash_profile, put in a single line: "source ~/.bashrc").
The "logout" command still won't work unless you alias it to "exit".
But I find it much easier (sometime to my horror) that CTRL-D works
just as well...


-- 
Eugene
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/x11-users/email@hidden

This email sent to email@hidden

References: 
 >login shell or not (From: Francis Derive <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.