Re: Bash login shells with X11 (executing .bash_profile, .bashrc)
Re: Bash login shells with X11 (executing .bash_profile, .bashrc)
- Subject: Re: Bash login shells with X11 (executing .bash_profile, .bashrc)
- From: magenta <email@hidden>
- Date: Fri, 7 Feb 2003 09:42:10 -0800
On Fri, Feb 07, 2003 at 09:11:46AM -0800, Lawrence You wrote:
> At 10:29 AM +0100 2/7/03, kristian ragndahl wrote:
> >On Thu, 6 Feb 2003, Lawrence You wrote:
> >
> >> Has anyone been able to get .bash_profile to be executed without
> >> having to specify "xterm --login"? When I start up an xterm from the
> >> X11 Beta, .bash_profile doesn't get run at any time.
> >
> >I put this in my ~/.Xdefaults;
> >XTerm*.LoginShell: True
>
> Thanks for this and the other responses. I use .Xdefaults for other
> programs but it didn't occur to me to try to set the resource for
> xterm. I can't remember ever having to set xterm for login before.
> That works.
>
> I was going to say that this behavior seems like a bug, i.e. that at
> some point, I'd assume that you would have "logged in" and the script
> would be executed. Since the login on Mac OS X is not shell-based,
> that assumption is wrong (and for the vast majority of Mac OS X
> users, a behavior they probably don't want or need). I think it would
> be nice for the X11 application to assume that it is taking care of
> the "login" step, albeit without any kind of authentication.
One thing you could do is force your .xinitrc to be run as a login process;
for example, make the first line
#!/bin/bash --login
assuming that .xinitrc is run as a normal script (rather than sourced by
something else).
> Anyway, for the record, I did a quick survey of Unix or Unix-like
> environments asking the question "Does it execute .bash_profile at
> 'login'?":
You mean "does it start the controlling process in a login shell."
> X11 for Mac OS X Beta: No
>
>
> It's subtle, I think I'm being pedantic, but I would like that last
> line to say "Yes."
Which doens't make a lot of sense to those of us who actually prefer tcsh
for their commandline interface. As others have stated, if you want
something to happen in all interactive shells, it goes into .bashrc, not
.bash_profile.
--
http://trikuare.cx
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.