0

I am using terminator as my terminal. Currently its title always comes prefixed with raj@raj-Lenovo which is my username and host. SO if I cd ~/test. It would show raj@raj-Lenovo ~/test as the title.It makes it difficult to read the entire title when I alt+Tab. Is there anyway to change the prefix permanently? It would just show ~/test. I couldnt find it through GUI.

rajeevmaash
  • 111
  • 1
  • 4

1 Answers1

1

Most terminal emulators have an option to set the title bar default text, and it should work for terminator too.

Maybe this what you want?

PROMPT_COMMAND='echo -en "\033]0; $("pwd") \a"'

It should change the title automatically even when you add new tab. See this link

askubuntu.com/questions/636944/how-to-change-the-title-of-the-current-terminal-tab-using-only-the-command-line

and if it works you can modify the Exec line in the corresponding desktop file.

sudodus
  • 45,126
  • 5
  • 87
  • 151
  • where do i find the ``Exec`` line? – rajeevmaash Jan 04 '17 at 17:41
  • This sets the title permanantly to ``Hello World`` . But what I like is to just remove ``raj@Lenovo`` from title. Still have my working directory in title. – rajeevmaash Jan 04 '17 at 17:44
  • 1. I have not installed terminator, so I am not sure, but I think you should find the file via this command: `find /usr/share -name terminator.desktop` I find the desktop files of 'my' terminal emulators with corresponding commands. 2. You can check at this link: https://askubuntu.com/questions/774532/how-to-change-terminal-title-in-ubuntu-16-04 but I am not sure that it works for terminator. – sudodus Jan 04 '17 at 18:21
  • But this permanantly changes the title. Thats not what I want. – rajeevmaash Jan 04 '17 at 19:53
  • Maybe this what you want? `PROMPT_COMMAND='echo -en "\033]0; $("pwd") \a"'` – sudodus Jan 04 '17 at 20:02