NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/54851 (.profile is not read by sh when using xdm or other login managers)



The following reply was made to PR xsrc/54851; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: "David A. Holland" <dholland%netbsd.org@localhost>
Subject: Re: xsrc/54851 (.profile is not read by sh when using xdm or other
 login managers)
Date: Thu, 18 Aug 2022 16:04:32 +0300

 On Thu, Aug 18, 2022 at 04:35:02 +0000, David Holland wrote:
 
 >  The thing is, though, that without a starter .xsession file most newer
 >  users end up in category (3). So I think this change was a good idea
 >  and the fact that it doesn't work perfectly for everyone isn't a
 >  problem.
 
 You do relaize that "most newer users" will probably just immediately
 install gnome or mate or whatever and will never be studying that
 Xsession script as an example, don't you? ;)
 
 As for the pedagocial value of that script - I'm already not very
 happy about e.g. the default xrdb with a here-document that it does.
 The same here-document is copy-pasted in xinitrc - instead of setting
 the default resources in a file that already gets automatically
 loaded.
 
 Speaking of which, when can we have tradcpp in base, so that there's a
 preprocessor for x resources even withour comp.tgz set installed? :)
 
 Testing a bit further with a scratch account I also notice that xdm
 doesn't propagate PATH set in login.conf.  It does call
 setusercontext(3) with LOGIN_SETALL but probably overrides the PATH
 later with the values from its resources.
 
 In short, the problem is more complex than it seems at first glance.
 The original fix happen to work by accident and not in all cases.  The
 login.conf(5) bug I've just noticed needs to be investigated in this
 context too - googling for 'xdm "login.conf"' comes up with a few
 relevant hits.
 
 I understand that working on this is to a large degree thanksless and
 tedious job that requires some knowledge of historical and current
 practices and at least an overview of a nontrivial matrix of options
 and choices that sysadmins and their users have at their disposal.  So
 I don't think that dismissing as "bikeshed" any feedback that poitns
 out this fact is a fair characterization.
 
 <humor>If you want bikeshedding, consider the case of having two X
 installations, say base and pkgsrc and you want xdm to ensure the
 right path to the rest of the X takes precedence and you can switch
 from one X installation to another and back by just switching which
 xdm the rc script runs - after that you would get you xterm &c from
 the the right X install, etc.<humor>  Please, don't reply to that.
 I'll probably gonna regret bringing this up, but the temptation is too
 strong. :)
 
 
 To summarize
 
 1) the DEF_USER_PAH we set in xmd reach-over makefile is wrong (netbsd bug)
 2) path setting in login.conf(5) is ignored (xdm bug)
 3) the current fix that sources .profile works around 1 and 2 by accident
 
 I think that short term we should revert 3, fix 1, and then
 investigate 2 separately.
 
 
 -uwe
 


Home | Main Index | Thread Index | Old Index