Ticket #1110 (closed defect: fixed)
More robust dotfiles
Reported by: | jdreed | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | Precise Release |
Component: | -- | Keywords: | |
Cc: | Fixed in version: | ||
Upstream bug: |
Description
Currently, if you screw up your PATH, the behavior is kind of terrible. You log in, and then the machine reboots. I see some potential solutions here:
1) In Xsession.debathena or somewhere early enough the process (/usr/lib/init/xsession maybe?) look at PATH and see if it contains /usr/bin. If not, append it (and possibly yell at the user).
2) Decide that Debian Policy of never specifying full paths to binaries is stupid, and ignore it.
3) The reboot code should throw up a Zenity dialog for 10 seconds or so that says "This failed catastrophically. If it happened at login time, fix your dotfiles."
Change History
comment:3 Changed 12 years ago by jdreed
I realized this is a dupe of #920. #920 suggests that we should just force people to have /bin and /usr/bin in their PATH. Thoughts? We're all about individual choice and stuff, but I'm not sure there's a valid reason to ever omit /usr/bin and /bin from your PATH, especially given Debian Policy regarding the full paths of binaries.
comment:4 Changed 12 years ago by jdreed
- Status changed from committed to development
dotfiles 10.0.30-0debathena2 in -dev
comment:5 Changed 12 years ago by jweiss
In tcsh $path uses spaces to separate path components. $PATH uses colons. Please apply a patch to switch to the latter.
--- cshrc.orig 2012-07-05 11:58:11.000000000 -0400
+++ cshrc 2012-07-09 23:25:04.920858100 -0400
@@ -185,11 +185,11 @@
if (! $?skip_sanity_checks) then
set missing=0
- echo $path | /usr/bin/tr ':' '\n' | /bin/grep -Fqx /bin
+ echo $PATH | /usr/bin/tr ':' '\n' | /bin/grep -Fqx /bin
if ( $? != 0 ) then
set missing=1
endif
- echo $path | /usr/bin/tr ':' '\n' | /bin/grep -Fqx /usr/bin
+ echo $PATH | /usr/bin/tr ':' '\n' | /bin/grep -Fqx /usr/bin
if ( $? != 0 ) then
set missing=1
endif
r25590. People who like guns aimed at their feet can set skip_sanity_checks=y.