Tag Info

New answers tagged


Create a functon in ~/.bashrc set-title(){ ORIG=$PS1 TITLE="\e]2;$@\a" PS1=${ORIG}${TITLE} } Then use your new command to set the terminal title. It works with spaces in the name too set-title my new tab title


From some quick searching, it doesn't look like there is a way to get gnome to display the dimensions. You can run these commands inside the terminal window to get the lines and columns respectively: tput lines tput cols


After spending a descent amount of time looking around, I finally found two solutions starting with the best one mentioned first. I present them for the sake of completeness: One has to make sure to have the following line in the terminator configuration file: always_split_with_profile = True under the [global_config] section. The same issue was brought up ...


Terminal parameters are stored as $LINES and $COLUMNS variables. Additionally you can use special term-operation programm, for example tput: tput lines # outputs the number of lines of the present terminal window. tput cols # outputs the number of columns of the present terminal window.


This command should give you the number of lines on the terminal: stty size | cut '-d ' -f1 Some systems might not implement stty size so you might need something like this instead: stty -a | tr \; \\012 | grep rows | tr -d ' rows'


Short answer: you can't, at least not exactly the way you want. More useful answer: you can achieve what you want by piping the output to something like more or less , for example : locate linux | less This will pause the output scroll at the end of each page, where the page length is defined as the terminal height.


If you want terminal to stay opened after command execution then just run some shell in it, e.g.: gnome-terminal -x bash -c 'test; bash'


Put your app in a script and add read at the end. test.sh: #!/bin/sh ./test read don't forget to add executable permission to your script

Top 50 recent answers are included