Fedora 8: tcsh .history file destroyed on exit?

Andreas M. Kirchwitz fedora-list at list.zikzak.de
Sat Feb 23 02:20:14 UTC 2008


James Frye <fryeja at us.ibm.com> wrote:

 > I've just installed Fedora 8 on a new machine (Lenovo T61p), and am having
 > problems getting
 > tcsh to run correctly.  The main problem is that when I exit, the .history
 > file is destroyed.  It's
 > not that the current session history is not saved.  I copied a .history
 > file from my older machine
 > loaded it, and the history mechanism works as expected for that session.
 > On restart, though,
 > I find that the .history file has been truncated to 0 bytes.
 
Thank God, I'm not the only one on this planet with that problem.
I'm using the version of "tcsh" that comes with Fedora 8 (manually
installed with "yum" because someone decided that "tcsh" shouldn't
be part of the default installation any longer).

 > If it helps, I run xterm under the fvwm2 window manage, and am using a
 > system setup that was
 > copied from the Fedora 7 install on my previous machine, and which have
 > worked with various
 > Fedora versions going back to 3 (IIRC), as well as other distros.
 
I'm using fvwm2 and xterm, too. ;-)

My .tcshrc contains the usual stuff:

	set history=500
	set savehist=(500 merge)

Saving and reloading history (by default, ~/.history) worked fine
in Fedora 7 and all previous releases. But in Fedora 8, "xterm -e ...",
"fvwm2" and "tcsh" do not work well together.
If I run "xterm -e ssh localhost" and use fvwm2's window close button,
tcsh's history is lost. It's also lost if I quit my fvwm2 session
(which implicitly closes all windows).

After some research with Google, I lost all hope because nobody
seems to use tcsh, fvwm2 and xterm nowadays. I'm a dying dinosaur.
For the last days on earth, I use the following workaround:

In "~/.logout", I save the history to a backup file:

	if ( $?tcsh != 0 ) then
		history -S ~/.history_backup
	endif

In "~/.login", I load (merge) the history from the backup file
in case the default history file is empty:

	if ( $?tcsh != 0 ) then
		if ( -z ~/.history ) history -M ~/.history_backup
	endif

There seems to be a very rare race condition where even that doesn't
work, but I couldn't reproduce this yet.

	Hope that helps ... Andreas




More information about the fedora-list mailing list