History is poorly handled

Asked by Scott Dunbar

This may be a bash bug - not sure.

If I have two terminals open why do they not know the history of each other? That is, I run a command in one window. The other window has no idea about the command. Why? I want to run the same command in another window. Or if the window I'm in hangs for some reason the command that I just executed is nowhere to be found.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gnome-terminal 3.4.1.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Wed Aug 8 19:55:15 2012
ExecutablePath: /usr/bin/gnome-terminal
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-terminal
UpgradeStatus: Upgraded to precise on 2012-04-27 (103 days ago)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Marcel Stimberg
Solved:
Last query:
Last reply:

This question was originally filed as bug #1034710.

Revision history for this message
Marcel Stimberg (marcelstimberg) said :
#1

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We understand the difficulties you are facing, but it is better to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at http://askubuntu.com or http://ubuntuforums.org. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs.

Revision history for this message
Best Marcel Stimberg (marcelstimberg) said :
#2

The history is handled by the shell (normally: bash), not by gnome-terminal. You can share the history between windows, for this you have to change your bash configuration file (~/.bashrc) -- see this stackoverflow question for instructions:
http://stackoverflow.com/questions/103944/real-time-history-export-amongst-bash-terminal-windows

Hope this helps, best
  Marcel

Revision history for this message
Scott Dunbar (scott-xigole) said :
#3

Thanks Marcel - I wasn't aware of this. You rock!