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: David Holland <>
Subject: Re: xsrc/54851 (.profile is not read by sh when using xdm or other
 login managers)
Date: Thu, 18 Aug 2022 04:34:17 +0000

 On Thu, Aug 18, 2022 at 01:15:01AM +0000, Valery Ushakov wrote:
  >  The suggested solution to this problem cannot rely on every user to
  >  have an up-to-date ~/.profile that sets these things up - even when
  >  their shell is not sh(1).
 There are several different user cases here as well:
 (1) Someone who knows what they're doing and makes a quick and dirty
 spare account with no dotfiles. This should still have a useful
 default path, regardless of what shell they stuff in the password
 entry. Reading ~/.profile won't help here, because there isn't one;
 xdm should be producing the correct default path.
 (2) Someone who doesn't know what they're doing and accidentally makes
 an account without dotfiles. This should behave usefully, especially
 since I've gathered from the recent bikeshedding that it's easy to do
 this. Here the issues also extend to the default shell configuration,
 but that's irrelevant to xdm.
 (3) Someone who more or less does know what they're doing, but doesn't
 know how to wrangle xdm, and didn't get given a starter .xsession file
 in their account. (Why don't we have a .xsession in /etc/skel?) These
 people expect that when they log in via xdm they'll get their path and
 locale settings. (Plus anything else they might have wanted to set in
 the environment, like say HACKOPTIONS.) If they use sh by default,
 reading ~/.profile in the default session takes care of their issues.
 (Though as you point out, probably it should also read /etc/profile.)
 If they use a different shell, it won't necessarily work, but if they
 understand different shells they are likely willing to update their
 ~/.profile as well.
 (4) Someone who's writing their own .xsession. They only need to be
 told to set the path and locale (and other such stuff) in it. The
 change we're arguing about doesn't make any difference for them,
 because it only affects the default session. Having a starter
 .xsession file would make everyone's lives easier, though.
 (5) Someone who already has a config they've been carrying around for
 decades. The whole issue is irrelevant because they already sorted out
 the issues on variously broken vendor unixes in the 80s or 90s.
 Most netbsd users are in category (5), I think, except for the ones
 who go straight to category (4), and the occasional occurrences of
 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
 David A. Holland

Home | Main Index | Thread Index | Old Index