I concede, this mail and my solution was not completely thought out. While making Xsession/xinitrc (tried startx since my first e-mail) run under sh -l would source .profile and allow it to set any environment variables, only that environment would persist, not any aliases or set commands which might be in ~/.profile. Since the former was all I usually modified in ~/.profile, I had a lower bar for 'working' than I should have had. That said, having .xsession/window managers inherit the user's environment as set by .profile does seem like a useful default thing, though perhaps sourcing it in the user's X startup scripts would be better. Anyway, the change made to .Xdefaults, I'm glad is in since it the less than default xterm they get on starting X has always been a stumbling block for people I introduced to OpenBSD (of course, I always helpfully, but incorrectly 'fixed' it with sh -l until now).

Anyway, apologies to all for the badly thought out mailing list noise.

Theo de Raadt wrote:
CVSROOT:    /cvs
Module name:    src
Changes by: dera...@cvs.openbsd.org 2009/04/25 11:36:48

Modified files:
etc : Makefile Added files: etc/root : dot.Xdefaults etc/skel : dot.Xdefaults
Log message:
Provide users by default with XTerm*loginShell:true.  This situation just is
ridiculous; xdm is totally broken since it never starts anything which resembles
a "login shell".  As a result, no configuration is brought into a process
context to give to future xterms or *sh shells and thus cause them to run their
.profile or .kshrc or such a thing, to get futher configuration.  Therefore
people are left with a totally bland unconfigured Unix environment in their
xterms, and don't know how to change this since .profile is ignored.  This
problem shows hundreds of thousands of google hits.  xdm is fundamentally
broken, but we must solve this also for the startx methods, too, and for people
running csh.  It is clear that .xsession is not a solution to this problem at
all (that is, assuming the people who suggest such a thing really mean a
.xsession file with the execute bit set).  This now becomes the recommended
way for new users to get out of this stupid situation; if someone does not
like it they can change it or delete it.  Few will.  Just watch.
ok kettenis guenther millert
Wouldn't replacing '#!/bin/sh' with '#!/bin/sh -l' in
/etc/X11/xdm/Xsession and /etc/X11/xinit/xinitrc work too?

What would that solve?

That isn't the users shell.
I'm using the former, I haven't used startx for years, so the latter I
haven't tried.

I don't understand where people like you come from.   If you want to
spew advice, why don't you TRY IT FIRST YOURSELF?
Wouldn't setting xterm to a login shell only solve one problem, the
other would be the environment for the window manager (and for
~/.xsession and ~/.xinitrc), e.g. requiring full paths for binaries
outside of the default (not the user) PATH amongst other things?

You didn't even read.

Reply via email to