[26807] in Athena Bugs

home help back first fref pref prev next nref lref last post

linux 9.4.21: bash

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Wed Apr 5 16:21:47 2006

Message-Id: <200604052019.k35KJeiK011657@cs13.mit.edu>
To: bugs@mit.edu
Date: Wed, 05 Apr 2006 16:19:40 -0400
From: Anders Kaseorg <andersk@mit.edu>
X-Spam-Score: 1.217
X-Spam-Level: * (1.217)
X-Spam-Flag: NO
Errors-To: bugs-bounces@mit.edu

System name:		cs13.mit.edu
Type and version:	i686 9.4.21
Display type:		nVidia Corporation NV15 [GeForce2 GTS/Pro] (rev a4)

Shell:			/bin/athena/bash
Window manager:		metacity

What were you trying to do?
	The default .bashrc incorrectly sets $HOME to the current
	directory in undesired situations. One way to reproduce the
	problem is to launch another gnome-terminal from a directory
	other than $HOME. For example,

	  $ cd Public
	  $ gnome-terminal &

What's wrong:
	The $HOME variable is incorrectly set to the current
	directory. This breaks everything: dotfiles don't run,
	programs don't find their configuration files, etc.

	  $ echo $HOME
	  /afs/athena.mit.edu/user/a/n/andersk/Public

What should have happened:
	$HOME should remain the same.

	  $ echo $HOME
	  /afs/athena.mit.edu/user/a/n/andersk

Please describe any relevant documentation references:
	Lines 117-132 of /usr/athena/lib/init/bashrc assume that "this
        code is being invoked only at the beginning of the session";
        apparently, this assumption is wrong.
	
	This is easily fixed by replacing x=`/bin/pwd` with
	x=`readlink "$HOME"`.

home help back first fref pref prev next nref lref last post