Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Amit Kulkarni-5
http://www.openbsd.org/faq/faq8.html#ksh

echo "XTerm*loginShell: true" >> ~/.Xdefaults

My .Xdefaults has "XTerm*loginShell:true"

Notice the missing space before true. I upgraded from a August 16,2010
snapshot to -current

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Ted Unangst-2
On Sat, Oct 2, 2010 at 5:33 PM, Amit Kulkarni <[hidden email]> wrote:
> http://www.openbsd.org/faq/faq8.html#ksh
>
> echo "XTerm*loginShell: true" >> ~/.Xdefaults
>
> My .Xdefaults has "XTerm*loginShell:true"
>
> Notice the missing space before true. I upgraded from a August 16,2010
> snapshot to -current

Yeah?  What's your point?

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Amit Kulkarni-5
I thought that the space makes a difference as .profile is still not being
read.

On Sat, Oct 2, 2010 at 5:45 PM, Ted Unangst <[hidden email]> wrote:

> On Sat, Oct 2, 2010 at 5:33 PM, Amit Kulkarni <[hidden email]> wrote:
> > http://www.openbsd.org/faq/faq8.html#ksh
> >
> > echo "XTerm*loginShell: true" >> ~/.Xdefaults
> >
> > My .Xdefaults has "XTerm*loginShell:true"
> >
> > Notice the missing space before true. I upgraded from a August 16,2010
> > snapshot to -current
>
> Yeah?  What's your point?

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Abel Abraham Camarillo Ojeda-2
Amit Kulkarni <[hidden email]> wrote:

> I thought that the space makes a difference as .profile is still not being
> read.
>
> On Sat, Oct 2, 2010 at 5:45 PM, Ted Unangst <[hidden email]> wrote:
>
> > On Sat, Oct 2, 2010 at 5:33 PM, Amit Kulkarni <[hidden email]> wrote:
> > > http://www.openbsd.org/faq/faq8.html#ksh
> > >
> > > echo "XTerm*loginShell: true" >> ~/.Xdefaults
> > >
> > > My .Xdefaults has "XTerm*loginShell:true"
> > >
> > > Notice the missing space before true. I upgraded from a August 16,2010
> > > snapshot to -current
> >
> > Yeah?  What's your point?

.Xdefaults has nothing to do with .profile ...

--
DISCLAIMER: http://goldmark.org/jeff/stupid-disclaimers/ 
This message will self-destruct in 3 seconds.

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Edho P Arief
In reply to this post by Amit Kulkarni-5
On Sun, Oct 3, 2010 at 5:59 AM, Amit Kulkarni <[hidden email]> wrote:
> I thought that the space makes a difference as .profile is still not being
> read.
>

It seems to still read my .profile fine with space (using 4.7-release)

--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Amit Kulkarni-5
In reply to this post by Abel Abraham Camarillo Ojeda-2
Then why is it placed there in the FAQ entry? Somebody thought there's a
relation there.

IMHO, I think ksh should be able to read .profile by default.

On Sat, Oct 2, 2010 at 10:39 PM, Abel Abraham Camarillo Ojeda <
[hidden email]> wrote:

> .Xdefaults has nothing to do with .profile ...

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Abel Abraham Camarillo Ojeda-2
On Sun, Oct 3, 2010 at 4:52 PM, Amit Kulkarni <[hidden email]> wrote:

> Then why is it placed there in the FAQ entry? Somebody thought there's a
> relation there.
>
> IMHO, I think ksh should be able to read .profile by default.
>
> On Sat, Oct 2, 2010 at 10:39 PM, Abel Abraham Camarillo Ojeda <
> [hidden email]> wrote:
>
>> .Xdefaults has nothing to do with .profile ...
>
>


Have you tried $ ksh -l;

or $ xterm -ls;

?

Just to test if your .profile really works...

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Sean Kamath
In reply to this post by Amit Kulkarni-5
On Oct 3, 2010, at 2:52 PM, Amit Kulkarni wrote:

> Then why is it placed there in the FAQ entry? Somebody thought there's a
> relation there.

It's there because when you start an X terminal (xterm), you can tell xterm
(via X resource DB) if you want shells it starts to be "login shells", and
that's what that resource setting is doing.  It is not a resource setting for
ksh.  Further, it's in the FAQ about "why isn't my .profile being read" for
the ksh because most people are completely unaware of what is going on when
they click that "Terminal" button.

.Xdefaults may or may not be read by X-based applications, and is often loaded
into the Resource DB of the X server on login (depending on the system --
everything does it differently).  At one point is was .Xresources (which may
be what X reads still -- I don't know anymore, I stopped thinking about xrdb
about 8 years ago).

The space is completely irrelevant, and this thread should die.

> IMHO, I think ksh should be able to read .profile by default

The rules of what ksh reads and when are based on ancient login mechanisms --
.profile was read only on login.  In the csh, .login was read on login, and
.cshrc was read on every invocation of csh.

ksh reads the file pointed to by the environment variable ENV on invocation.

Put things you want to happen when you log in (via SSH, for example) into
.profile, and also set ENV=$HOME/.kshrc into it.  Then put everything into
.kshrc that you want to invoke with all subshells.

It's no good to say "I think ksh should do. . ." because it ain't gonna
happen.  It would break all sorts of crap if it did.


Sean

PS Linux's pdksh sucks, and does all sorts of weird shit.  OpenBSD's ksh is
much more sane.


> On Sat, Oct 2, 2010 at 10:39 PM, Abel Abraham Camarillo Ojeda <
> [hidden email]> wrote:
>
>> .Xdefaults has nothing to do with .profile ...

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect FAQ entry about "ksh(1) does not appear to read my .profile"

Amit Kulkarni-5
Sean, Sorry my bad. Thanks for enlightening me.

Abel, ksh -l works for me and will use both of your suggestions.

Thanks

On Mon, Oct 4, 2010 at 1:24 AM, Sean Kamath <[hidden email]> wrote:

>
> On Oct 3, 2010, at 2:52 PM, Amit Kulkarni wrote:
>
> > Then why is it placed there in the FAQ entry? Somebody thought there's a
> > relation there.
>
> It's there because when you start an X terminal (xterm), you can tell xterm
> (via X resource DB) if you want shells it starts to be "login shells", and
> that's what that resource setting is doing.  It is not a resource setting
> for ksh.  Further, it's in the FAQ about "why isn't my .profile being read"
> for the ksh because most people are completely unaware of what is going on
> when they click that "Terminal" button.
>
> .Xdefaults may or may not be read by X-based applications, and is often
> loaded into the Resource DB of the X server on login (depending on the
> system -- everything does it differently).  At one point is was .Xresources
> (which may be what X reads still -- I don't know anymore, I stopped thinking
> about xrdb about 8 years ago).
>
> The space is completely irrelevant, and this thread should die.
>
> > IMHO, I think ksh should be able to read .profile by default
>
> The rules of what ksh reads and when are based on ancient login mechanisms
> -- .profile was read only on login.  In the csh, .login was read on login,
> and .cshrc was read on every invocation of csh.
>
> ksh reads the file pointed to by the environment variable ENV on
> invocation.
>
> Put things you want to happen when you log in (via SSH, for example) into
> .profile, and also set ENV=$HOME/.kshrc into it.  Then put everything into
> .kshrc that you want to invoke with all subshells.
>
> It's no good to say "I think ksh should do. . ." because it ain't gonna
> happen.  It would break all sorts of crap if it did.
>
>
> Sean
>
> PS Linux's pdksh sucks, and does all sorts of weird shit.  OpenBSD's ksh is
> much more sane.
>
>
> > On Sat, Oct 2, 2010 at 10:39 PM, Abel Abraham Camarillo Ojeda <
> > [hidden email]> wrote:
> >
> >> .Xdefaults has nothing to do with .profile ...