I am trying to output log text to gnome-terminal tabs from the command line. This can be useful for saving session data and later restoring it.
Here is an example:
#! /bin/bash long_text=$(awk "BEGIN { for (i = 1; i < 120; i++ ) { printf \"%s\", \"1234567890\" } }") cmd="bash -c \"stty cols 159; echo \\\"$long_text\\\"; tput cols; exec bash\"" gnome-terminal --maximize --tab -t A -e "$cmd" --tab -t B -e "$cmd"
The problem that I have is that only the last tab (tab B) will initially respect the column width of 159. The first tab (tab A) uses a column width of 80. Here is a screen shot of tab A:
And here is tab B:
How can I output text also to tab A using 159 columns?
Answer
You can change the profile preferences to match your requirements quite easily.
Choose edit->Profile preferences from the menu and adjust to match your requirements as shown below.
Attribution
Source : Link , Question Author : Håkon Hægland , Answer Author : Elder Geek