Somehow, when I start my X session in Ubuntu 16.04, I get a Gnome Terminal window with 6 tabs and they all works as expected except for the last tab. That one loses the Esc-p / Alt-P functionality.

Since it works in the other 5 tabs, my idea would be that's because it is the last tab. At the same time, if I close that tab and reopen a new one, that new one works as expected.

That terminal window gets opened automatically whenever I open my X session.

Another thing that does not work either is Ctrl-d. The first time I hit that one, I get a ^D in the console and it does not get killed.

As a side note, one thing that I do in my .bashrc is stty -ctlecho so I do not get the ^C all the time (which otherwise prevents me from using copy/paste!) So it feels like that specific like does not get executed since I see the ^D when typing the Ctrl-d key in the console.

What could be going wrong?

The concerned binaries:

alexis   23335 22889  0 08:31 ?        00:00:22 /usr/lib/gnome-terminal/gnome-terminal-server
alexis   23376 23335  0 08:31 pts/19   00:00:00 bash
alexis   23377 23335  0 08:31 pts/20   00:00:00 bash
alexis   23378 23335  0 08:31 pts/21   00:00:00 bash
alexis   23379 23335  0 08:31 pts/22   00:00:00 bash
alexis   23387 23335  0 08:31 pts/23   00:00:00 bash
alexis   23430 23335  0 08:31 pts/24   00:00:00 bash
alexis   24960 23335  0 08:53 pts/5    00:00:00 bash
alexis   25387 23335  0 09:02 pts/6    00:00:00 bash
  • 1
    Could you please clarify which terminal emulator and how you are using exactly? xterm does not support tabs, so it's either not xterm, or not tabs that you have. – egmont Jul 29 '16 at 21:33
  • @egmont, ah... I always think of it as an xterm since I'm under X and that's a terminal. I updated my question. – Alexis Wilke Jul 29 '16 at 22:38

I found out today what the problem is.

I changed my prompt a few days ago to include time (H:M:S) after the current path, so that way I can see when I ran a command. This is useful when I want to have an idea of how long a command takes without having to each time think of using /usr/bin/time.

This addition made the length of the prompt that much longer (9 more characters, with the space) and the Esc-p / Alt-P functionality gets turned off because it decides that the position of the cursor is too far away from column 1.

If I do:

cd ..

just once, the length of the prompt is reduced just enough that the functionality returns!

Note that Ctrl-R still works.

  • Did you found a solution to make it work? – Philippe Gachoud Dec 18 '17 at 1:44
  • @PhilippeGachoud Well, short of using Ctrl-R, not really. – Alexis Wilke Dec 18 '17 at 9:34

changed my ~/.inputrc in vi editing mode with following configuration

set completion-ignore-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on

set editing-mode vi
set keymap vi-insert



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.