title: synchronizing history when ipython notebook and console are connected to the same kernel
body: <p>I have <code>ipython notebook</code> running on a remote server, i.e.</p>
  
  <pre><code>ipython notebook --profile=nbserver
  </code></pre>
  
  <p>which I access from my local machine. Further, I ssh to the remote server from my machine, and start ipython console (terminal) on that server. I have found following command to work well:</p>
  
  <pre><code>ipython console --existing \
  ~/.config/ipython/profile_nbserver/security/kernel-*.json
  </code></pre>
  
  <p>Now I am connected to the same remote kernel from two different clients (lets call them <code>browser</code> and <code>terminal</code>). Everything works well, except one annoying detail:</p>
  
  <p>1) in <code>browser</code>, I type <code>a=1</code></p>
  
  <p>2) in <code>terminal</code>, I type <code>b=2</code></p>
  
  <p>3) in both clients I can see both commands using <code>%history</code>. But when I want to cycle through the history (in <code>terminal</code>) using <kbd>Up</kbd>, it only shows the commands which have been typed in the terminal, (i.e <code>b=2</code>). Similarly, I am unable to use <code>a</code> + <kbd>PageDown</kbd> in the terminal, to go back in history and find the command starting with <code>a</code>.</p>
  
  <p>From what I understand, my two clients are using two separate history files <code>history.sqlite</code>. But why does <code>%history</code> show all commands ?</p>
  
  <p><strong>Question:</strong> 
  Is there any way to configure using one <code>history.sqlite</code> for both  clients ?</p>
  
  <p>I find, having easy access to history is absolutely crucial. Moreover, I see using both terminal and browser as complementary, they both have tradeoffs and are best used combined.</p>