On Sun, Aug 14, 2022 at 09:13:23AM +0700, Robert Elz wrote: > It is also certainly wrong to add /usr/X11R7/bin to $PATH unless the > user is actually in an X environment, that ought be added in the X11 > startup scripts, not in the shell, or in user.cs_path A profile > file can check if DISPLAY is set, doing that in the shell isn't appropriate.
That's a nice idea, in a way, but: (1) startx is in there, so if you don't already have it in the path you will find starting X a nuisance if you have logged in on the console (which I think is not uncommon); (2) it's not common but far from unheard-of to log in somewhere without a DISPLAY and then start X programs on some otherwise existing display. (Examples of this being useful include (a) starting a new window manager if the original one has cored and left you without window focus; (b) starting xlock remotely when you accidentally went home without locking your session; (c) screendumping or otherwise salvaging what you were doing when PR 44712 strikes and you can't switch back to your display.) Granted, if you know enough about what you're doing to do this, having /usr/X11R7/bin not in the PATH is only an annoyance, but it's highly irritating. (3) it is entirely moot if you installed X from pkgsrc, in which case all the X bins are on the path (or not) regardless. (4) it's far from the case that the only things that require an X display live in /usr/X11R7/bin. So I think it's an unnecessary complication to worry about this issue. -- David A. Holland dholl...@netbsd.org