Hi,
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.
I have two perhaps related other problems. First, tcsh was not installed by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually.
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.
Thanks, James
James Frye wrote:
I have two perhaps related other problems. First, tcsh was not
installed
by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually. >
Dumb question - why did you compile it from source instead of running "yum install tcsh"?
Mikkel
James Frye wrote:
I have two perhaps related other problems. First, tcsh was not
installed
by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually. >
Dumb question - why did you compile it from source instead of running "yum install tcsh"?
Perhaps dumber answer: what's "yum"? I don't mean that as a literal question, and I can do a search for more info now that you've given me a hint. I mean how should I know about it, when it's not mentioned in any installation instructions I've ever seen?
As to why I compiled from source, how else would I do it? To me that's the normal way to install most software (except for a few proprietaty things like Acrobat) that doesn't come with a distribution - and indeed, some that does. I generally recompile the kernel once I have a new system up & running...
Thanks, James
On Thu, 2008-02-21 at 13:16 -0800, James Frye wrote:
James Frye wrote:
I have two perhaps related other problems. First, tcsh was not
installed
by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually. >
Dumb question - why did you compile it from source instead of running "yum install tcsh"?
Perhaps dumber answer: what's "yum"? I don't mean that as a literal question, and I can do a search for more info now that you've given me a hint. I mean how should I know about it, when it's not mentioned in any installation instructions I've ever seen?
As to why I compiled from source, how else would I do it? To me that's the normal way to install most software (except for a few proprietaty things like Acrobat) that doesn't come with a distribution - and indeed, some that does. I generally recompile the kernel once I have a new system up & running...
Thanks, James
It is a real problem to run fedora without knowing about yum. It is nno doubt installed on your machine as the basic package installer. Try: man yum You really need to know about it.
James Frye kirjoitti viestissään (lähetysaika torstai, 21. helmikuuta 2008):
Perhaps dumber answer: what's "yum"? I don't mean that as a literal question, and I can do a search for more info now that you've given me a hint. I mean how should I know about it, when it's not mentioned in any installation instructions I've ever seen?
It's mentioned in Chapter 18 of the Fedora 8 Installation Guide: http://docs.fedoraproject.org/install-guide/f8/en_US/ch-next-steps.html and in the "Top Docs" section of the Fedora Documentation webpage: http://docs.fedoraproject.org/
As to why I compiled from source, how else would I do it? To me that's the normal way to install most software
In that case you should be running Linux From Scratch or Gentoo instead of Fedora. Fedora is based on the RPM package management system.
Perhaps dumber answer: what's "yum"? I don't mean that as a literal question, and I can do a search for more info now that you've given me
yum is the software install tool (command line) and tcsh does come with the distribution it just isn't installed by default. There is a lot of software in Fedora more than fits on a few CDs.
Graphically "pirut" servers the same purpose
James Frye wrote:
James Frye wrote:
I have two perhaps related other problems. First, tcsh was not
installed
by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually. >
Dumb question - why did you compile it from source instead of running "yum install tcsh"?
Perhaps dumber answer: what's "yum"? I don't mean that as a literal question, and I can do a search for more info now that you've given me a hint. I mean how should I know about it, when it's not mentioned in any installation instructions I've ever seen?
As to why I compiled from source, how else would I do it? To me that's the normal way to install most software (except for a few proprietaty things like Acrobat) that doesn't come with a distribution - and indeed, some that does. I generally recompile the kernel once I have a new system up & running...
Thanks, James
Well, tcsh is included in the distribution. But not all the packages included with the distribution are on the install DVD. They will not all fit. So if you want more software, you can use yum from the command line, or one of the GUI front ends like yumex. It is also the program that handles updates. Others have pointed out where to find the documentation on it, so I will not go into that again. But it is hard to manage a Fedora system without at least a little knowledge of YUM and RPM.
With Fedora, the normal way to install software is to install an RPM. Most of what you will need is already packaged that way. If you need something that is not already packaged as an RPM, they you can always build you own. There may already be a .spec file included with the source code to help you.
Mikkel
James Frye wrote:
Hi,
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.
This has been the default behavior for tcsh for many years. I can't even remember what year that changed ...
Check your .tcshrc -- your savehist may not be correct: here is mine:
set history=999 set savehist=900 merge
I have two perhaps related other problems. First, tcsh was not installed by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually.
As another has suggested:
# yum install tcsh
It may not be a good idea to set root's shell to tcsh, since many processes executed as root may depend on bash syntax.
Having installed from source, the tcsh binary may have the wrong permissions:
-> ls -l /bin/tcsh -rwxr-xr-x 1 root root 351528 2007-08-31 03:39 /bin/tcsh*
Or may have been built with less than optimal 'configure' arguments.
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.
Good luck!
James Frye wrote:
Hi,
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.
This has been the default behavior for tcsh for many years. I can't even remember what year that changed ...
Check your .tcshrc -- your savehist may not be correct: here is mine:
set history=999 set savehist=900 merge
I know, that's why I have savehist &c set, just as your example (except different numbers). This isn't a new setup: it's just migrating what does work on my current systems, and has (with ongoing modifications) since long before my first Linux system.
It may not be a good idea to set root's shell to tcsh, since many processes executed as root may depend on bash syntax.
It's always worked before, and if it doesn't, that's a bug in whatever shell script isn't working.
Having installed from source, the tcsh binary may have the wrong permissions:
-> ls -l /bin/tcsh -rwxr-xr-x 1 root root 351528 2007-08-31 03:39 /bin/tcsh*
Or may have been built with less than optimal 'configure' arguments.
Permissions are ok. It does work, and will load/save history if I do it manually, just not automatically on exit. Root also works fine if I do a "source .tcshrc" after logging in.
James
I have two perhaps related other problems. First, tcsh was not installed by the install system. I had to compile it from source. Second, the root user does not source its .tcshrc file when I su or log in as root. I have to do this manually.
So you built and its buggy ?
Perhaps the first thing to try would be to install the FC tcsh package ?
(yum install tcsh; hash -r; tcsh)
and see if that works ?
James Frye fryeja@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
James Frye fryeja@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).
I installed the "yum" version, and still have the same problems. My userid doesn't save history (though your trick works around it), root doesn't even execute its .login or .cshrc - but does seem to execute commands that are in .bashrc :-(
After some research with Google, I lost all hope because nobody seems to use tcsh, fvwm2 and xterm nowadays. I'm a dying dinosaur.
There is a fairly active fvwm forum, and ongoing development: fvwm.lair.be
I can't really relate to the "dinosaur" comment. I think it's a different attitude. To me the computer is a tool with which I do certain things, not an end in itself, so I don't need/want decoration.
James
On Sat, Feb 23, 2008 at 10:00:37AM -0800, James Frye wrote:
James Frye fryeja@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).
That was indeed a "nasty" surprise on F8, especially since my post-install script that I used to customize the installation was a tcsh script;) But well, installing tcsh from a customized kickstart file took care of that part. Still, I would prefer it to be available in the package selection in the installer.
On the other hand, onze I had tcsh back on the system, I have not seem the 0-byte .histrory file problem. I'm currently using a couple of computers, with a mix of fedora 7, Fedora 8 and rawhide, with /home shared over nfs, and I have not encountered any problems. So unfortunately, I have no tip or solution for you to solve the issue.
I installed the "yum" version, and still have the same problems. My userid doesn't save history (though your trick works around it), root doesn't even execute its .login or .cshrc - but does seem to execute commands that are in .bashrc :-(
Well, that seems to indicate that root still has bash as its shell, as is the default on Fedora (and almost any Linux/Unix system). So either change root's shell in /etc/passwd (but, maybe this will break something in the system!), execute tcsh every time you use su, of just accept that root uses bash and modify your customizations to work in bash (if it's just a small set of environment settings, aliases etc).
After some research with Google, I lost all hope because nobody seems to use tcsh, fvwm2 and xterm nowadays. I'm a dying dinosaur.
There is a fairly active fvwm forum, and ongoing development: fvwm.lair.be
I can't really relate to the "dinosaur" comment. I think it's a different attitude. To me the computer is a tool with which I do certain things, not an end in itself, so I don't need/want decoration.
I'm probably a partial dinosaur then, I use tcsh, and sometimes xterm (gnome terminal over an ssh X-tunnel does not really work). On the other hand, I enjoy the decoration and other nice desktop features, as long as they don't interfere with using the computer to get work done. So I run gnome, and most of the time compiz as well. But for other bits of work, I prefer xterm, mutt, vi etc. It's all about choice and freedom, so everyone can pick their own set of tools.
David Jansen
Well, that seems to indicate that root still has bash as its shell, as is the default on Fedora (and almost any Linux/Unix system). So either change root's shell in /etc/passwd (but, maybe this will break something in the system!), execute tcsh every time you use su, of just accept that root uses bash and modify your customizations to work in bash (if it's just a small set of environment settings, aliases etc).
It has /bin/tcsh as the shell in /etc/passwd (the first thing I checked, of course). Maybe it's actually reading a shadow file? Some sort of security thing, where "security" is defined as "if you can't use it, you can't break it".
But for other bits of work, I prefer xterm, mutt, vi etc. It's all about choice and freedom, so everyone can pick their own set of tools.
Well, it SHOULD be, but it seems as though there's a faction in the development> community that wants everyone to use their Windows look-alike "desktop". I get> the impression their real desire is to keep Microsoft from making more money, instead of providing alternatives to MS's gawdawful (to my taste) GUI.