Ticket #1110 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

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:1 Changed 9 years ago by jdreed

r25590. People who like guns aimed at their feet can set skip_sanity_checks=y.

comment:2 Changed 9 years ago by jdreed

  • Status changed from new to committed

comment:3 Changed 9 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 9 years ago by jdreed

  • Status changed from committed to development

dotfiles 10.0.30-0debathena2 in -dev

comment:5 Changed 9 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

comment:6 Changed 9 years ago by jdreed

Ooops. Thanks for catching that. A new version has been built and is being uploaded to -proposed as we speak.

comment:7 Changed 9 years ago by jdreed

  • Status changed from development to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.