![]() |
Xterm does not saved all executed commands
As the title says Xterm does not seem to save all previous executed commands. Usually in terminal you can press the up arrow and scroll through previous command to save typing it all again. Xterm seems vert hit and miss saving some and missing quite alot. Anyone else have this or have found a work around?
|
Re: Xterm does not saved all executed commands
I think this is down to the use of ash as the default shell. One option is to install bash, and configure user to use it. It works for me. Its in one of the extras(-foo) repos somewhere, all usual caveats apply.
|
Re: Xterm does not saved all executed commands
Thanks I will give it a bash..... No pun intended lol
Cheers |
Re: Xterm does not saved all executed commands
Quote:
|
Re: Xterm does not saved all executed commands
It's possible that your .ash_history has the incorrect permissions/ownership. This should only occur if the first time you open xterm you sudo gainroot - since no .ash_history exists, when you exit root's shell it is created with only root having permission to write (preventing non-root command history from being written to the file).
Use 'ls -l /home/user/.ash_history' to verify. If the file is owned by root (3rd column), that is your problem. sudo gainroot chown user.users /home/user/.ash_history OR sudo gainroot chmod a+w /home/user/.ash_history Either will fix the permissions to allow non-root command history to be retained. |
Re: Xterm does not saved all executed commands
Quote:
|
Re: Xterm does not saved all executed commands
Two notes about this:
First, I found that ~/.ash_history, the file where ash normally saves history information, had root as the owner and group; this prevented saving history. Check and see if you have the same problem, and if so, remove ~/.ash_history. See bug 5896 for one reason that might happen. Second, note that history does *not* get saved if you click the X in the upper-right corner of the xterm. Instead, type "exit", or press ctrl-d. See bug 5317 for that. |
Re: Xterm does not saved all executed commands
Quote:
|
Re: Xterm does not saved all executed commands
Quote:
Code:
echo "trap exit SIGHUP SIGINT SIGTERM" >> /home/user/.profile |
Re: Xterm does not saved all executed commands
Quote:
Code:
echo 'trap exit SIGHUP' >> .profile |
Re: Xterm does not saved all executed commands
As for this:
Quote:
I noticed that $HISTFILE is set to /home/user/.ash_history, but $HISTSIZE is not initialized by default. Is it a different variable in ash? |
Re: Xterm does not saved all executed commands
I can confirm that ash only saves 15 lines of history. This still proves useful, but given 2GB of space for /home, I'd rather store a few thousand. :)
I looked into it, and it seems that this gets set at compile time, not runtime. As far as I can tell, no means exists to set this at runtime. Thus, I've filed bug 7014, asking for this limit to increase or become dynamic. |
All times are GMT. The time now is 19:09. |
vBulletin® Version 3.8.8