Sample Header Ad - 728x90

How to explicitly set the tabname of a new gnome-terminal?

4 votes
1 answer
339 views
I want to explicity rename a tab in gnome-terminal on startup of the tab. I don't want to use gnome-terminal --title flag as that gets reset by my systems bashrc file after whatever else is supposed to run. I have used this command with success in a normal terminal export PROMPT_COMMAND="echo -ne '\033]0;TABNAME\007'" This command works fine to rename the current tab's name, but when I try to use it in conjunction with gnome-terminal execute command, I am not getting proper output. I have used gnome-terminal --e flag to execute simple commands with success, something like this will bring up a new terminal and echo hey then return to bash gnome-terminal -e "bash -c 'echo hey';bash" Here is what I am trying ***note the escaped " " marks that I added*** TABNAME="export PROMPT_COMMAND=\"echo -ne '\033]0;TABNAME\007'\"" gnome-terminal --tab --e "bash -c $TABNAME;bash" I always get weird output no matter how I change the quotes, but I think that is where the problem is.
Asked by Prodnegel (141 rep)
Jan 31, 2017, 08:35 PM
Last activity: Nov 14, 2024, 08:27 AM